I am using the "note" question in survey 123 connect and I just found out that it will not do what I need.
This is my question that I have built in the XLSForm
Compliant or Not Compliant will not show up in my data export into excel.
this is what shows up in the excel.
How can I get either Compliant or Not Compliant to be marked in excel? I am wanting to use this a lot in the survey to make collection quick and to show is something right or not.
Thank you
Todd
todd@beneficialdesigns.com
Solved! Go to Solution.
@BillBlythe, these were the expressions I used:
For the Compliance text field it is:
if(selected(${ClearSpaceProvided},'yes'),'Compliant',if(selected(${ClearSpaceProvided},'no'),'Not Compliant',''))
and for the Compliancebcp it is:
if(selected(${benchClearSpaceWidthlength},'yes'),'Compliant',if(selected(${benchClearSpaceWidthlength},'no'),'Not Compliant',''))
I attached the form with these calculation expressions included.
Todd,
The Note type is not a pick list, or choice, it is for entering free text.
Are you sure you need to use XLSForms, you can do an awful lot without having to get into the desktop app.
Free course: Get Started with ArcGIS Survey123
If you want to use XLSForms, here's a video that goes through it all: Advanced XLSForm Techniques
Hope this helps you out. Sometimes going through the training is a lot faster than having to ask questions one by one. If you did these training resources already I apologize, but it sounds like maybe you haven't.
@BillBlythe you could also put a calculation in a secondary text entry field named something like "Compliance" or "Compliance Status," as shown in the images attached below. You could even make this read only or hidden when it populates Compliance/Not Compliant based on the first yes/no answer.
There's more detailed info on this Survey123 Blog Post called, "The art of hiding:"
https://community.esri.com/t5/arcgis-survey123-blog/the-art-of-hiding/ba-p/898454
And that is yet another idea I hadn't thought of. Nice!
if(selected(${ClearSpaceOverlap},'Yes'),'Not Compliant',if(selected(${ClearSpaceOverlap},'No'),'Compliant',"))
What am I missing here? typed it in and gives me an error.
Todd
I don't think you need the second part of this. It's an "if/else" calculation. The first part is "if this,this, else that. So in instance below, 'Not_compliant' is what would be chosen if yes is selected, 'Compiant' is what would be selected if the answer is no is selected.
if(selected(${clearspaceselected},'yes'),'Not_compliant','Compliant')
Here's the documentation on the formula
https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm
And another question from this forum where someone used multiple choices...
Let me know how it works out for you, Bill. I'm curious to see what you come up with.
@BillBlythe, the if expressions vary slightly in how they print a result in the secondary "Compliance Status" text field if the user skips or leaves blank the initial select_one yes_no question.
Using the following expression from @AllisonHollier, the secondary "Compliance Status" text field will be populated with 'Compliant' even if the initial select_one yes_no question is left blank.
if(selected(${ClearSpaceOverlap},'yes'),'Not Compliant','Compliant'))
Using the following "nested if" expression, the Compliance text field remains empty (see ending else argument of '' empty single quote) if the user doesn't select either 'yes' or 'no' for the first question (skips or leaves it blank).
if(selected(${ClearSpaceOverlap},'yes'),'Not Compliant',if(selected(${ClearSpaceOverlap},'no'),'Compliant',"))
So you have a couple options there for choosing how the Compliance Status field is treated.
Definitely bookmarking this post! Thanks, Thomas...
Thomas
I have typed this in and keep getting an error. I am so sorry to keep bugging you, but what you did would be great and I just need to be able to get it.
Allison gave a great way, but when I do this to another yes/no question I get a problem because it shows a not compliant box where there is no question. The question is based on a question above.
Hi Allison
This is so close, it works for yes and I do get compliant, but when I hit no, nothing comes up.
So close here and I get the feeling it is something small.
Todd