Questions not following relevant logic in web browser

603
9
Jump to solution
05-12-2023 10:21 PM
KyleHash
New Contributor II

 

Hi, 

I have a survey that uses A LOT of relevant logic in the questions. 

It works fine in the app version but these settings are completely ignored in the web version all questions appear and looks terrible. 

Below is an example of the opening screen before a driver is selected.

Should only show Select Driver, with questions appearing AFTER a driver is selected. 

KyleHash_1-1683954671528.png 

Below is what the web version looks like. The questions are already showing up before a driver is selected!

KyleHash_2-1683954763636.png

Is this a common thing in survey123 and if so how do I fix it? There will be a lot of people using the web version for some time and if the relevant column doesn't work then there will be a lot of confusion. 

Here is an example of the logic that is used:

A Driver must be selected and cannot be a "a.Add New Driver"

KyleHash_3-1683955156061.png

 

Thanks

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

I understand it may look like that works but a better way is ${Q1} != "" or string-length(${Q1}) > 0

so your example is better written as

${Q1} != '' and ${Q1}!='N/A'

Connect tends to be much more forgiving in weird syntax like that.  That is why you are seeing it not work in the web is my guess.  They work different for sure.  

I suggest trying that as I have never seen the way you listed before.  

View solution in original post

9 Replies
KyleHash
New Contributor II

I also want to mention I tried replacing the spaces of 'a.Add New Driver' with 'a.Add_New_Driver' and I get the same result

0 Kudos
DougBrowning
MVP Esteemed Contributor

Are you trying to check for blank?  If so I use != '' or string-length() > 0.  try that

0 Kudos
KyleHash
New Contributor II

No, the idea is that there is a list of driver names to select from. However, if their name isn't in the list they have the option to "Add a New Driver" so I only want certain things to show up based on different criteria. In the example above the following questions appear only if the question is selected and cannot be "Add new Driver". 

This has nothing to do with checking for blanks or string length. 

The problem is that the web browser is ignoring the relevant criteria and it is all showing up all at once regardless of if things are selected or not, and in this case, it doesn't matter if its selected. The questions appear when the survey opens when nothing has been selected yet. 

0 Kudos
DougBrowning
MVP Esteemed Contributor

 questions appear only if the question is selected  - not sure what you mean here.  What does selected mean? Just putting ${Select_Driver} does not really do anything.  I also have no idea why you have a.Add New Driver.  There is no dot notation in 123 so what is the a. for?  

Just ${Select_Driver} != "Add New Driver" should work.

Posting the form would help a lot.

0 Kudos
KyleHash
New Contributor II

Doug,

${Select_Driver} absolutely does something. 

Say you have Questions 1-5 in a survey. 

When you want to open a survey and only have Q1 shown. The only way to show the other questions is if you select/answer Q1. So the notation would be ${Q1} in the relevant column for Questions 2-5. So now the only way for Questions 2 - 5 to appear is if Question 1 is selected, at this point it doesn't matter what the selection choice was for Question 1, only that Question 1 has been selected. 

Now say Question 1 has 3 choices. Yes, No, N/A and you want Q2-Q5 to shown as long as Q1 isn't equal to N/A. For that you'd input ${Q1}!='N/A' in the relevant column. However, doing just that notation only makes the questions go away if N/A is selected. They will still show at the begining of the survey regardless if Q1 is answered or not. 

To make them appear AFTER Q1 is selected AND if Q1 doesn't equaly N/A then you need this:

${Q1} and ${Q1}!='N/A'

Now again, going back to my problem, is that these notations do not work in the web version ONLY the APP Version. 

0 Kudos
DougBrowning
MVP Esteemed Contributor

I understand it may look like that works but a better way is ${Q1} != "" or string-length(${Q1}) > 0

so your example is better written as

${Q1} != '' and ${Q1}!='N/A'

Connect tends to be much more forgiving in weird syntax like that.  That is why you are seeing it not work in the web is my guess.  They work different for sure.  

I suggest trying that as I have never seen the way you listed before.  

KyleHash
New Contributor II

Ah I see. I apologize, once you said that Connect is more forgiving that made more sense to when you said the ${} doesn't do anything.

It works properly now and I accepted as a solution. 

Thank you Doug

AmandaSapp
New Contributor II

@KyleHash wrote:

 

Hi, 

I have a survey that uses A LOT of relevant logic in the questions. 

It works fine in the app version but these settings are completely ignored in the web version all questions appear and looks terrible. 

Below is an example of the opening screen before a driver is selected.

Should only show Select Driver, with questions appearing AFTER a driver is selected. 

KyleHash_1-1683954671528.png 

Below is what the web version looks like. The questions are already showing up before a driver is selected!

KyleHash_2-1683954763636.png

Is this a common thing in survey123 and if so how do I fix it? There will be a lot of people using the web version for some time and if the relevant column doesn't work then there will be a lot of confusion. 

Here is an example of the logic that is used:

A Driver must be selected and cannot be a "a.Add New Driver"

KyleHash_3-1683955156061.png

 

Thanks


 

0 Kudos
AmandaSapp
New Contributor II

To build on this I have an issue. I have several relevant calls defined in the XLS, they all work in the connect app and only one does not work in the web form.

 

Can someone please help me figure out why only one of the relevant calls do not function in the web form. I attached the XLS - the issue is on line 7 - line 7 should only be presented when the user selects line 6 where line 6 choice = unclear. I have been struggling for days on this. Please help. It is important to note ALL relevant calls work as expected in the connect app.

0 Kudos