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.
This is what I am looking for if I can make it happen. I thank you so much for you effort and hope that we can make this work. It is so challenging, I am thinking it is something very simple but I can not get it.
Todd
@BillBlythe, can you post your Survey123 .xls file?
@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.
Thomas
Yes! it works. Thank you so much. Any idea what I was doing wrong?
Thank you again for you time and effort.
Todd Ackerman
Beneficial Designs
@BillBlythe, you simply had an expression with a single if statement instead of the "nested" if statement. The latter treats answers of "yes," "no," and blank differently whereas the single if statement does not. I included a little bit more detail about the differences in this previous response. I hope this is helpful! 🙂
Try checking the case sensitivity of your 'Yes' and 'No.' I think these should match between the Choices sheet and the Calculation in your Survey sheet.
I had changed mine from the default lowercase 'yes' and 'no' under the choices sheet, so you may either have to change them there or in your calculation cell such that they match.
I'm not sure exactly what you are trying to do as I have not ever exported anything to Excel, but I have auto-populated a field based on a previous selection using the if statement. My question for you is, how are you determining what is compliant and what is not compliant? Whether it has a clear space overlap? If so, then you might try an "if" statement in the calculate field in combination with your note.
if(selected(${clearspaceselected},'yes'),'Not_compliant','Compliant')
In this example, if overlap is selected as yes, then it will give the calculate expression "not complaint", otherwise if it's no, it will return "compliant". You were on the right track with note, but I think you needed the if statement as well in order to return the value you need in an excel export.
Again, I'm flying blind here, but you might try it to see if it does what you need. I used it to populate a serial number if a particular unit that was selected. There are only two units, so it worked for me, I'm not sure what I would have done if there had been more choices...
Hope that helps.
Allison