Default not working while hidden.

670
6
Jump to solution
12-08-2019 08:26 AM
chiragtiwari
New Contributor II

Default Answer not working when hidden.

I read that there are issues with using Default values while hiding the fields. Has this issue been resolved?

I am trying to use default values on a hidden set of fields which won't populate.

Sincerely,

Chirag Tiwari

0 Kudos
1 Solution

Accepted Solutions
Jing_Sun
Esri Contributor

Hi Chirag,

I am confused because you were saying 'unhide' the question, because to 'unhide' a hidden question you need to change the question type to something else, say 'note' question type.

Please forget about changing the question type in my earlier reply, because adjusting your hidden question might solve the problem. 

So I think you are referring to a question like this: 

This should work as long as the 'calculation' field has noting in it. What it returns is the string 'default value'.

From your description I guess your actual hidden question looks like this:

This time it will return the sting '${question_1}' instead of the answer of question_1.

What you can do is to put the '${question_1}' in calculation instead, this way it will return the answer of question_1. 

What wouldn't work is the scenario below, the hidden question will respect the calculation field instead of the default field. If this is what you are trying to achieve, I would suggest using if statement in the calculation instead.

It would be great if you can share a screenshot of the question.

Cheers,

Sun

View solution in original post

6 Replies
by Anonymous User
Not applicable

Hi Chirag,

Are you referring to the hidden question type with a default set not working, or hiding a question by making it not relevant and then the default doesn't work?

Can you share your xlsx file and more details about which exact questions are not working as you expect? Also does the issue happen when doing a new collect (new survey record) or when editing an existing record via the Inbox or Sent box?

Regards,

Phil.

0 Kudos
chiragtiwari
New Contributor II

Dear Phil,

Please forgive the tardiness of my reply.  This is happening with new records that I am adding to the survey form.  I am referring to the hidden question type and setting a default value that the survey user can't see but I can alter later during internal audits. When I unhide the question with the default value it appears to be working just fine.  But when I make it a hidden question with a select_one value system it fails to populate the default answer.

Sincerely,
Chirag Tiwari

0 Kudos
Jing_Sun
Esri Contributor

Hi Chirag,

Instead of using Hidden question type, you can use Calculate question type. 

This question type is also hidden and works just like a Hidden question type. 

Cheers,

Sun

0 Kudos
chiragtiwari
New Contributor II

Hi Sun, thanks for your help can you past an example of how you would do this, also my answer is a text or string will this work for calculate?

0 Kudos
Jing_Sun
Esri Contributor

Hi Chirag,

I am confused because you were saying 'unhide' the question, because to 'unhide' a hidden question you need to change the question type to something else, say 'note' question type.

Please forget about changing the question type in my earlier reply, because adjusting your hidden question might solve the problem. 

So I think you are referring to a question like this: 

This should work as long as the 'calculation' field has noting in it. What it returns is the string 'default value'.

From your description I guess your actual hidden question looks like this:

This time it will return the sting '${question_1}' instead of the answer of question_1.

What you can do is to put the '${question_1}' in calculation instead, this way it will return the answer of question_1. 

What wouldn't work is the scenario below, the hidden question will respect the calculation field instead of the default field. If this is what you are trying to achieve, I would suggest using if statement in the calculation instead.

It would be great if you can share a screenshot of the question.

Cheers,

Sun

chiragtiwari
New Contributor II

Hi Jing,

Your advice helped me fix the problem thanks for your assistance.

Sincerely,

Chirag

0 Kudos