Dependency between survey categories

shill
Mega Sage

I have a survey that has a first question that asks if the user has used a particular application. This question is in its own category.

If the user selects yes, then we need to display a rating category with several likert template questions, but hide these if the user selects no.

In addition, I have another category that deals with questions when they select no.

It appears that I cannot base any dependency on those questions in the second category based on the answer to the question in the first category.

Is there any way I can do this?

If I move the first question into the same category as the likert scales, it messes up the category header and looks awful.

1 ACCEPTED SOLUTION

jessicasnieder
Giga Contributor

Hi guys,

I encountered the same issue and after some investigation I found out that in the dictionary entry of the field depends on an advanced reference qualifier is added. You can open the dictionary entry via the Question table in the backend (see comment from shloke04)

Current reference qualifier:

javascript:'category=' + current.category + '^sys_id!=' + current.sys_id + '^method=assessment^datatypeINchoice,scale,numericscale,template,boolean,checkbox,imagescale,multiplecheckbox'

 

If you remove the part 'category=' + current.category + '^ you can select questions in other categories as well. It also shows questions from other surveys so if anyone can add the script to show only questions in the survey to which this question is related that would be great!!

Anyways, for now my dependency across survey categories issue is solved and I can continue to setup the survey.

Hope this helps 🙂

View solution in original post

11 REPLIES 11

Julie,


No, I never did figure out a workaround.


We ended up redesigning the survey to account for that limitation.


michaelmchugh
Kilo Expert

I have the same scenario where I want to group a survey using several categories but the questions within the survey are dependent on questions that are in different categories.

So I tried to see if I could set the dependencies outside of the Designer after creating the various categories, as illustrated above

Unfortunately you cannot. Categories are actually Assessment Metrics and the questions must be defined within that metric in order to group them. Looks like dependencies cannot bridge Assessment Metrics.

ServiceNow, please consider this for future enhancements.

jessicasnieder
Giga Contributor

Hi guys,

I encountered the same issue and after some investigation I found out that in the dictionary entry of the field depends on an advanced reference qualifier is added. You can open the dictionary entry via the Question table in the backend (see comment from shloke04)

Current reference qualifier:

javascript:'category=' + current.category + '^sys_id!=' + current.sys_id + '^method=assessment^datatypeINchoice,scale,numericscale,template,boolean,checkbox,imagescale,multiplecheckbox'

 

If you remove the part 'category=' + current.category + '^ you can select questions in other categories as well. It also shows questions from other surveys so if anyone can add the script to show only questions in the survey to which this question is related that would be great!!

Anyways, for now my dependency across survey categories issue is solved and I can continue to setup the survey.

Hope this helps 🙂

Hi Jessica,

 

I know this is a bit of a late response but I am currently working on this as well. I have come up with a way to write the Reference Qualifier so that it shows multiple categories, but stays boxed within the current assessment you are in.

 

I am doing this for an assessment not a survey, so it may not be a direct match, but the Reference Qualifier script I am using is:

 

javascript:'category.metric_type=' + current.category.metric_type + '^sys_id!=' + current.sys_id + '^method=assessment^datatypeINchoice,scale,numericscale,template,boolean,checkbox,imagescale,multiplecheckbox'

 

 

I've tested this and if you add the category and type to the reference list when selecting what question you are dependent on, you can confirm that you are viewing the different categories available but only within the assessment template you're working in.

 

Hope it helps!

Chris

This was very helpful. I was almost reformulating the questions and categories to make this work, but your reference qualifier worked and I was able to configure the dependencies between categories.