- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2023 12:55 PM
Is it possible to have 1 survey but display questions based on user criteria? For example, we may have 20 questions, but an employee in the US should only see 10 of them, an employee in France may see 15, etc
Ideally, we are looking for a way to manage 1 survey instead of creating 10 different variations based on requirements specific to a user's location.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2023 03:04 PM
Yes, it is possible to have one survey and display questions based on user criteria in ServiceNow. One approach is to use the 'Conditions' functionality within the survey to control which questions are displayed to which users.
To do this, you would need to create a set of conditions for each location, and then apply these conditions to the relevant questions. For example, you could create a condition for employees in the US that shows only 10 questions, and a different condition for employees in France that shows 15 questions.
To create a condition, you can use the 'When' field on each question. This field allows you to specify a condition using ServiceNow's 'GlideForm' syntax. For example, you could use a condition like 'gs.getUser().getPreference("user_location") == "US"' to show the question only to employees in the US.
You can also use multiple conditions to control the display of a single question. For example, you could use a condition like 'gs.getUser().getPreference("user_location") == "US" && gs.getUser().getPreference("question_type") == "basic"' to show a particular question only to employees in the US who have selected a particular question type.
By using conditions in this way, you can create a single survey that adapts to the needs of different users based on their location, department, or other criteria.
Please mark my answer as a solution/helpful in case it adds value and moves you a step closer to your desired ServiceNow solution goal.
Thanks,
Punit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2023 03:04 PM
Yes, it is possible to have one survey and display questions based on user criteria in ServiceNow. One approach is to use the 'Conditions' functionality within the survey to control which questions are displayed to which users.
To do this, you would need to create a set of conditions for each location, and then apply these conditions to the relevant questions. For example, you could create a condition for employees in the US that shows only 10 questions, and a different condition for employees in France that shows 15 questions.
To create a condition, you can use the 'When' field on each question. This field allows you to specify a condition using ServiceNow's 'GlideForm' syntax. For example, you could use a condition like 'gs.getUser().getPreference("user_location") == "US"' to show the question only to employees in the US.
You can also use multiple conditions to control the display of a single question. For example, you could use a condition like 'gs.getUser().getPreference("user_location") == "US" && gs.getUser().getPreference("question_type") == "basic"' to show a particular question only to employees in the US who have selected a particular question type.
By using conditions in this way, you can create a single survey that adapts to the needs of different users based on their location, department, or other criteria.
Please mark my answer as a solution/helpful in case it adds value and moves you a step closer to your desired ServiceNow solution goal.
Thanks,
Punit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2024 03:43 AM
Sorry Punit,
I don't find this field "When" on Question; can you specify me which is this field you mentioned?
Thanks