Backward compatibility - 2021 apps opening 2020 survey

316
4
Jump to solution
08-11-2021 07:47 PM
MicZatorsky_AEC
Occasional Contributor II

Is anyone aware of a change to Survey 123 Connect and Survey123 for iOS that would result in loss of backward compatibility – today's apps not working with last year's survey?

I have a survey designed last year, that worked in last year's versions, which is not working completely as-designed in current versions desktop or iOS.

The survey was designed in October last year in Survey123 Connect v3.11.123

In the screenshot below, the Quantity fields use a pulldata() function to determine their relevance, based on the type of defect selected. 

When the survey is viewed today in the old Survey123 Connect v3.11.123 the form behaves as designed. The Quantity fields appear when they are supposed to:

MicZatorsky_AEC_0-1628736152636.png

 

When the survey is viewed today from an iPad running the old Survey123 v3.11.164  - the version that was current in October last year – also it looks fine.

MicZatorsky_AEC_1-1628736152644.png


However, if that same survey is opened in the current desktop and iOS applications it does not work as designed.  In  Survey123 Connect v3.12.232 the quantity fields do not trigger when they are supposed to:

MicZatorsky_AEC_2-1628736152651.png

Similarly, when viewed on an iPhone SE running Survey v3.12.277 fields do not appear.

MicZatorsky_AEC_3-1628736152656.png

 

Is this expected? A known bug?  

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Notable Contributor

I thought for sure it was the / in your lists but no.  That was why I wanted to test it to relate to my own projects.  Then I thought it was using the same name for a list as the field name - I have seen issues with this so may want to change.

I traced it down to the calculation for the defect field.  I am not sure what you wrote here and am surprised it ever worked really.  It is like no if statement I have seen.  I changed it to how I would write it and now it all seems to work.

Was

if(selected(${flexible_defect},''),if(selected(${rigid_defect},''),if(selected(${other_defect},''),'none',${other_defect}),${rigid_defect}),${flexible_defect})

Change to

if(${flexible_defect} != '', ${flexible_defect}, if(${rigid_defect} != '', ${rigid_defect}, if(${other_defect} != '', ${other_defect}, 'none')))

Hope that helps

View solution in original post

4 Replies
DougBrowning
MVP Notable Contributor

Can you post the form?  Most of these I see are due to the lists now being stored in SQL.  You could have a reserved word or some formatting that SQL is mad about.  Just a guess without seeing the form.

0 Kudos
MicZatorsky_AEC
Occasional Contributor II

The XLSX, and the look-up csv from the media folder are attached.

If the input is as below, it works in current versions:

Inspection Class 1  =  Defect
Inspection Class 2  =  Flexible Pavement Defect
Flexible Defect = Cracking

If the input is as below, it works old versions, but not current versions

Inspection Class 1  =  Defect
Inspection Class 2  =  Rigid Pavement Defect
Flexible Defect = Cracking


It always works in the old versions.  It depends in the new version.

Thanks for taking the time to look at it.

0 Kudos
DougBrowning
MVP Notable Contributor

I thought for sure it was the / in your lists but no.  That was why I wanted to test it to relate to my own projects.  Then I thought it was using the same name for a list as the field name - I have seen issues with this so may want to change.

I traced it down to the calculation for the defect field.  I am not sure what you wrote here and am surprised it ever worked really.  It is like no if statement I have seen.  I changed it to how I would write it and now it all seems to work.

Was

if(selected(${flexible_defect},''),if(selected(${rigid_defect},''),if(selected(${other_defect},''),'none',${other_defect}),${rigid_defect}),${flexible_defect})

Change to

if(${flexible_defect} != '', ${flexible_defect}, if(${rigid_defect} != '', ${rigid_defect}, if(${other_defect} != '', ${other_defect}, 'none')))

Hope that helps

MicZatorsky_AEC
Occasional Contributor II

Thanks Doug!

 The overly nested IF was not pretty but it worked, Excels' not my native language.  Thanks for the cleaner alternative.