You can configure a Survey to present users with different questions based on whether they are a member of a certain user group.
To configure this, you need to toggle the Expert Mode at the top right. Then, from the Designer tab, open Conditions for the question you want to be dependent and input isInGroup('CONFLUENCE_GROUP_NAME').
If you want to add more than one group in the condition, the correct syntax is
Another way to add this functionality is through the JSON tab. Here, the condition there looks like this.
The result of this will be that the question with this condition will only be visible to the group that is written in the condition.
If an invalid group name is entered, a warning message will be displayed while the Survey is still in Draft. Please check and fix the issue before opening the Survey.
In addition, the isInGroup functionality can also be applied to the different options within a question, as well as to an entire page. This can also be configured either through the Designer or the JSON tab.
To add a condition for an option, open Choice Options for the chosen question. Then, click on the “pencil” icon on the option which you want to add isInGroup.
Finally, insert isInGroup('CONFLUENCE_GROUP_NAME') for a condition on the item you want to make group dependent.
For making the entire page dependent on a group, the logic is the same as for a question. Open Conditions for the chosen page and insert the condition.