Select to view content in your preferred language

Survey123 Feature report, conditional check if field is blank

1790
5
01-10-2020 02:41 AM
CharlesDexter
New Contributor

Hello, 

I was trying to create a feature report where if data was not added to a field then it returned a standard string of text. however it looks like the use of "" is not allowed?

Currently the expression i have is:

${if equipment_name == “”}No Controlled field equipment used${/}

However this comes up with the error: Error: Failed to parse ${ ghd_personel == /“”}.

Does anyone know how to check if data is present in a field? 

Thanks

Charles

0 Kudos
5 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Charles,

It looks like the error is located at another location than the equipment_name tag you mention in your question.  Can you share your template and XLSFile?  If you wish to share privately, please e-mail me directly at jtedrick AT Esri.com.

0 Kudos
joerodmey
MVP Alum

Hi James Tedrick‌,

I too would like to know if this is possible.


Thanks

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Joe,

Yes, it should be possible with the syntax Charles presented in his question.

0 Kudos
ChristopherDawe
Regular Contributor

Hi James,

I have tried the above syntax but i am not getting the results i expect using ${if fieldname==""}...${/} and wondering if this is only true for text questions? I am trying it with select_one and select_multiple to get it to return set text if nothing is selected but it doesnt appear to work

Thanks

Chris

0 Kudos
MichaelPellerin-Cavell
New Contributor

try this syntax it worked for me : ${if fieldname==null}...${/}

0 Kudos