Hi,
I have a working survey that uses Pulldata to populate various fields from a CSV.
This is working fine except when there is a new site (which is obviously not in the CSV) to be added.
I have been trying to add an additional question (siteType), which would use the Pulldata function if one of the four options is selected, but not use Pulldata if the selection was "New".
Is there a way to construct an If statement that only uses the Pulldata function for certain answers?
Thanks,
Paul
Solved! Go to Solution.
I think this should work?
if(${siteType} != "New", pulldata("whatever your parameters are"), "")
That should check to see if the answer to your site type question is "New" or not, and if it is, it will leave those questions blank, but will populate for every other answer.
Make sure that it's checking for the name, not the label.
I think this should work?
if(${siteType} != "New", pulldata("whatever your parameters are"), "")
That should check to see if the answer to your site type question is "New" or not, and if it is, it will leave those questions blank, but will populate for every other answer.
Make sure that it's checking for the name, not the label.
Hi Alfred,
Thanks! That worked perfectly. I realised that I could still use the Pulldata in the calcRiverName, and then use the value in the riverName from this if the siteType was not 'new' as you suggested:
if(${siteType} != 'new', ${calcRiverName}, " ")
I also figured out a way to populate the Site Name based on whether it was picked from the PullData or entered by the user (see attached screenshot). I need the Site Name later in the survey...
Thanks for your help!
Paul