My question type in survey 123 is wrong

4514
27
Jump to solution
07-17-2021 08:46 AM
BillBlythe
New Contributor III

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

note question.PNG

Compliant or Not Compliant will not show up in my data export into excel.

this is what shows up in the excel.

ISA.PNG

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

27 Replies
BillBlythe
New Contributor III

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

ThomasHamill
Occasional Contributor II

@BillBlythe, can you post your Survey123 .xls file?

Kindest Regards,

t
BillBlythe
New Contributor III

Here it is

ThomasHamill
Occasional Contributor II

@BillBlythe, these were the expressions I used:

ThomasHamill_0-1626806402291.png

 

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.

 

Kindest Regards,

t
BillBlythe
New Contributor III

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

ThomasHamill
Occasional Contributor II

@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! 🙂

Kindest Regards,

t
0 Kudos
ThomasHamill
Occasional Contributor II

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.

ThomasHamill_0-1626714163656.png

 

Kindest Regards,

t
AllisonHollier
New Contributor III

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