How to return a blank from IF THEN statement in hidden field?

169
2
Jump to solution
10-19-2018 12:13 PM
Highlighted
New Contributor II

I am using an IF THEN statement in the calculation column of a hidden field. If the user answers 'no' to the question then 'N/A' is returned. If the user answers 'yes' then nothing is returned, which I have designated by using ''. Here's the statement:  if(${BM_1}='no', 'N/A', ''). It's important that the blank field is returned as blank on the printed report. However, it is being returned as "undefined" instead. I want this field to remain hidden in the survey itself. If the field is not hidden in the survey, a blank is returned on the printed report. If the field is hidden, it returns "undefined". This is how I want it set up:

I have attached the spreadsheet and Word template. There are 11 questions which will be formatted this way, starting at line 30. It's kind of a mess, because I've been playing around with various ways to try to get this to work.

Is there a way around this issue?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Frequent Contributor

Hi Chris,

Sorry for the delay in replying to this post, however I came across it while looking for something else so thought I would give you an update. I tested your report template with your xlsx form published as a new survey and the issue no longer occurs with the latest release of the website. I believe the problem with "undefined" being displayed when values are "null" in the report was resolved recently. Can you please try again with your survey and report template and let me know if you still have any issues.

Phil.

View solution in original post

2 Replies
Highlighted
Esri Frequent Contributor

Hi Chris,

Sorry for the delay in replying to this post, however I came across it while looking for something else so thought I would give you an update. I tested your report template with your xlsx form published as a new survey and the issue no longer occurs with the latest release of the website. I believe the problem with "undefined" being displayed when values are "null" in the report was resolved recently. Can you please try again with your survey and report template and let me know if you still have any issues.

Phil.

View solution in original post

Highlighted
New Contributor II

Hi Phil, 

Sorry for the late reply, and thanks for testing this and getting back to me. This does work properly now. 

Thanks,

Chris