Facing issues with creating "skip logic" with rating question

Hi, I am creating the following skip logic but every time the following error message comes up"There has been a problem trying to replace ${undefined} with the XPath to the survey element named ‘undefined’. There is no survey element with this name."

Here is the skip logic I try to create:

  1. The question asks user to pick from objectives, it is a multiple choice option:
    a. Objective 1
    b. Objective 2
    c. …so on

  2. Next I create indicator questions so that once the use picks one or two objectives above, the skip logic will show only the indicator related to objectives above. For example, if the user selects objective 1 below it will only show indicators related to this. The indicator question is a rating type where I have two options “Yes” and “No”. So for each indicator, a user will indicate “Yes” or “No” .

  3. Then I created 3 question(numeric type), which should popup only when the user selects “yes” to the indicator questions. For example, if for indicator 1 the option “Yes” is selected than the third question should show. This is where I get the issue. When I put the skip logic the error message appears.

Any support is highly appreciated.

Thank you,
Suhaily

Welcome to the community, @MEL! This is due to a syntax issue within your xlsform. Try validating them with this online validator . The online validator should help you identify syntax issues present within your xlsform.

Being more specific with your issue, you have tried to reference an expression using the variable name undefined which itself is not present in your survey tab. Maybe you will need to search for the undefined in your survey tab to find it out for yourself.

Thank you Kal_Lam. The issue is I have not created this in xlsform but just form creator in KoBo. It does work with other type of questions but only the rating one is giving this issue.

As a quick reference, please check out your variable name and the variable name that you have used in the skipping expression. You could figure out the issue if there is a variation in the same.

I only select the variable from the existing list that appears in “Skip Logic” so the variable name is correct, as I don’t enter it manually.

@MEL, maybe this post discussed previously should help you solve your issue (with adding a skip logic to your rating question):

maybe these snapshots will be more clear to solve this. Please check this in a very simple visual presentation.


basically, in the second question which is numeric, I am hoping when Indicator 1 “Yes” is selected this should popup the question and I can enter the number. If “No” this second question will not show-up.


and when I try to view in in form, this message shows up!

@MEL, if you look at your xlsform you should see something like this that is affecting your skip logic:

Here the relevant should be something like ${Indicator_1} !='' or ${Indicator_2} !='' instead of ${} != ''. So, the thing is that you could fix this issue by downloading your survey project as xlsform and updating the skip syntax in it or by updating the skip logic under the MANUALLY ENTER YOUR SKIP LOGIC IN XLSFORM CODE. However, this is something KoBoToolbox will need to improve in the upcoming days. Thank you for bringing this to our attention. Expecting the same in the upcoming days too. You could, however, go through our support article Adding Skip Logic to learn more on adding a skip logic to your survey form.

Thanks much, and will look forward to hear from you on this development!

1 Like

Hello @Kal_Lam. Just checking with you if any progress was made on this request. thanks.

@MEL, it should take time.

I tried to fix this with xls fom but it changes the question from “rating” to “select one” type. Not sure how to fix it.

That is how it is seen in the xlsform. You need not worry. You could still proceed with the survey.

Skip logic

Yes, but this is what I get…

All you need to do is to follow the following steps:

  • Create a rating question in your form builder.
  • Download the same as xlsform.
  • Change the skipping.
  • Upload it back to the server.

And it’s done. Please note that you should not delete any of the appearance or groups while editing the xlsform. If you do you will distort the settings and may end up like the one you are seeing above.

it works now. THANK YOU!

1 Like