How can I hide or set read-only a survey question

Goose 25
Tera Contributor

Hello community,

I have a use case where I have some questions appearing, depending on a value stored in the instance I am working on.

I decided to get this information from a script and fill in a question in my survey.

I configure the method of this question as default answer from a script and use data type numeric.

In the script I am able to find the information and set the actual_result and debug it.

I also set the field ask question : only if script provides no default answer.

When I try to trigger the survey this questions doesn't appear in the instance's question list.

Is it possible in these conditions to make a question read only - hidden in ServiceNow but use it for setting the dependencies on other questions?

2 REPLIES 2

Priyanka Vasant
Tera Guru

Hi Baptiste,

you can hide the survey question based on the selected answer of another question. To achieve this open survey in survey designer and you can use dependency.as shown in below image.

find_real_file.pngfind_real_file.png

You can make question as mandatory but not sure about making read only.

Regards,

Priyanka

 

Hi,

Thank you for your reply,

In my case I couldn't use dependency because this question doesn't depend on any question, it should not appear in the survey and other questions will depends on the answer from this question.

So far the only solution I found on internet would be to change the UI page where we take the survey.