Skip Logic within Repeat

Hey community,
I think I have figured out how to get the skip logic to work within the a repeat groups, but I would like to hear what your opinions are on the topic.
I have to go into the code, and the only thing that I can find that dictates the skip feature is in the region. Is the only thing I have to do is write the relevant = command at the end of the instance? Is there any other call outs that I need to be aware of to make this work? Does the repeat command come before the relevant = command or vice versa, or does it matter?
Ok I am going to try this out and hope for the best.
Hope to hear from someone soon.
Survey starts next Sunday in the Whitechapel district of London…

Cheers

Dustin

Dustin,
it’s pretty easy to make an error, since any space or misplaced semicolon with cause a failure.
So, good news and bad news…
Good News: the new KoBoForm has all this automated so you don’t have to do it by hand anymore. Check it out: http://www.kobotoolbox.org/updates/2012/08/new-improved-repeating-groups

Bad News: You’ve already done all the work. It should be easier to just fix your survey than start all over, why don’t you attach the form and send it this way. We will take a look at it and see what the issue is.

~Neil Hendrick
KoBo Developer

···

On Mon, Aug 13, 2012 at 1:24 AM, Dustin Locke locke...@gmail.com wrote:

Hey community,
I think I have figured out how to get the skip logic to work within the a repeat groups, but I would like to hear what your opinions are on the topic.

I have to go into the code, and the only thing that I can find that dictates the skip feature is in the region. Is the only thing I have to do is write the relevant = command at the end of the instance? Is there any other call outs that I need to be aware of to make this work? Does the repeat command come before the relevant = command or vice versa, or does it matter?

Ok I am going to try this out and hope for the best.
Hope to hear from someone soon.
Survey starts next Sunday in the Whitechapel district of London…

Cheers

Dustin

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To view this discussion on the web visit https://groups.google.com/d/msg/kobo-users/-/qpeBUu7HbmoJ.

To post to this group, send email to kobo-...@googlegroups.com.

To unsubscribe from this group, send email to kobo-users+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/kobo-users?hl=en.

Hello and thank you for this incredibly great work ! Excuse my bad english … i’m french :slight_smile:

I try to make a survey where a repeat section come only when i answer another question (Skip logic condition).

I try that :

  1. I used the KoboForm you link and follow the guide. I try to insert a skip logic condition on my group element but there’s systematicely this error : (TypeError): Cannot call method ‘Hk’ of null
  2. I used the KoboForm too, and try to put skip logic condition on the repeat section element. My xml save is ok but don’t work. The repeat section come at all time.
  3. I used the Koboform too, suppr the group element, only put the repeat section element and put the skip logic condition. Same result.
  4. I used the Koboform too, only put a repeat section element and put the skip logic condition to the repeat section and all the questions inside it. Same result.
  5. So I edit the xml, and I had a nodeset for the repeat section (The Form don’t do that, for a good reason i think but …), and of course i put a “relevant” condition for this nodeset. On the smarphone it’s a perfect result. All gone good in the survey (i join it in zip in this mail). Unfortunately when i synchronize my surveys, i do not aggregate the datas of the questions inside the repeat section (i use ODK aggregate 1.2.0, and whitout skip logic it works fine with kobo repeat sections).

Do you have some ideas to help me ?

Big thanks in advance,

I want to add something out of the subject. With this new KoboForm there is something wrong with the “Hint” text. The XML generation don’t put some " with the texte value, so an error occur in ODK collect app because there’s the but not the text to put. I hope it can help.

Rémy CLEMENT

(GIS administrator in environnemental projects)

Linking files don’t work in my mail so i paste my xml code juste here :

<?xml version="1.0" encoding="UTF-8"?>

<h:html xmlns:jr=“http://openrosa.org/javarosa” xmlns=“http://www.w3.org/1999/xhtml” xmlns:h=“http://www.w3.org/1999/xhtml” xmlns:kobo=“http://www.kobotoolbox.org/xmlns” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

<h:head>

<h:title ref=“jr:itext(‘test’)”>test</h:title>

<A04_01/>

<A04_02/>

  <bind id="A04" nodeset="/test/A04" type="xsd:string" required="true()" relevant="/test/A01 = '1'"/>

  <bind id="A04_01" nodeset="/test/A04/A04_01" type="xsd:string" required="true()"/>

test

Lancement

Oui vas-y

non non

Donne ton avis

alors ?

resultats

oui

non

peut-etre

Informations pour toi

	  <text id="A05-hint">

coucou

</h:head>

<h:body>

1

2

1

2

3

</h:body>

</h:html>

···

Le lundi 13 août 2012 16:59:05 UTC+2, Neil Hendrick a écrit :

Dustin,
it’s pretty easy to make an error, since any space or misplaced semicolon with cause a failure.
So, good news and bad news…
Good News: the new KoBoForm has all this automated so you don’t have to do it by hand anymore. Check it out: http://www.kobotoolbox.org/updates/2012/08/new-improved-repeating-groups

Bad News: You’ve already done all the work. It should be easier to just fix your survey than start all over, why don’t you attach the form and send it this way. We will take a look at it and see what the issue is.

~Neil Hendrick
KoBo Developer

On Mon, Aug 13, 2012 at 1:24 AM, Dustin Locke lock...@gmail.com wrote:

Hey community,
I think I have figured out how to get the skip logic to work within the a repeat groups, but I would like to hear what your opinions are on the topic.

I have to go into the code, and the only thing that I can find that dictates the skip feature is in the region. Is the only thing I have to do is write the relevant = command at the end of the instance? Is there any other call outs that I need to be aware of to make this work? Does the repeat command come before the relevant = command or vice versa, or does it matter?

Ok I am going to try this out and hope for the best.
Hope to hear from someone soon.
Survey starts next Sunday in the Whitechapel district of London…

Cheers

Dustin

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To view this discussion on the web visit https://groups.google.com/d/msg/kobo-users/-/qpeBUu7HbmoJ.

To post to this group, send email to kobo...@googlegroups.com.

To unsubscribe from this group, send email to kobo-users+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/kobo-users?hl=en.

Dear All,

Same old problem with skip logic, has anybody found out how to do this. I have tried about 5 times, each time creating a new form but I still get the same error (Not a valid question) see attached.

I have uploaded both my xml and the screenshots of the error I receive. Once I click okay, select my logic question, the answers don’t show.

I want to apply the skip logic on the next question appear(and prompt for price) If the item was sold.

Please help!!!

Bernard.

Skipv6.xml.xml (9.63 KB)

Skip_Logic_Error.pdf (53.4 KB)

···

On Monday, August 13, 2012 8:24:40 AM UTC+3, Dustin Locke wrote:

Hey community,
I think I have figured out how to get the skip logic to work within the a repeat groups, but I would like to hear what your opinions are on the topic.
I have to go into the code, and the only thing that I can find that dictates the skip feature is in the region. Is the only thing I have to do is write the relevant = command at the end of the instance? Is there any other call outs that I need to be aware of to make this work? Does the repeat command come before the relevant = command or vice versa, or does it matter?
Ok I am going to try this out and hope for the best.
Hope to hear from someone soon.
Survey starts next Sunday in the Whitechapel district of London…

Cheers

Dustin

Bernard,
After loading your form, i confirm your issue. Thanks for including your XML and a screenshot of the error, very helpful! We’ve made some improvements to the handling of skip logic within groups, but I will have to dig into this. Let me get back to you with a solution.

~Neil

···

On Wed, Jan 30, 2013 at 9:00 AM, Bernard Lukwiya luk...@gmail.com wrote:

Dear All,

Same old problem with skip logic, has anybody found out how to do this. I have tried about 5 times, each time creating a new form but I still get the same error (Not a valid question) see attached.

I have uploaded both my xml and the screenshots of the error I receive. Once I click okay, select my logic question, the answers don’t show.

I want to apply the skip logic on the next question appear(and prompt for price) If the item was sold.

Please help!!!

Bernard.

On Monday, August 13, 2012 8:24:40 AM UTC+3, Dustin Locke wrote:

Hey community,
I think I have figured out how to get the skip logic to work within the a repeat groups, but I would like to hear what your opinions are on the topic.
I have to go into the code, and the only thing that I can find that dictates the skip feature is in the region. Is the only thing I have to do is write the relevant = command at the end of the instance? Is there any other call outs that I need to be aware of to make this work? Does the repeat command come before the relevant = command or vice versa, or does it matter?

Ok I am going to try this out and hope for the best.
Hope to hear from someone soon.
Survey starts next Sunday in the Whitechapel district of London…

Cheers

Dustin

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at http://groups.google.com/group/kobo-users?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

Bernard,
This is a great question, and it gives a look inside the slightly more complex skip logic required for operating within a repeating group.
I will explain here in some detail how this works.

First off, yes, there was a flaw in KoBoForm’s working with skip logic inside repeating groups, so kudos to the KoBoNauts who found this and brought it to the developer’s attention. We are fixing this right now and will push the changes to the online KoBoForm asap. The problem is with KoboForm not liking a question from a repeat as the value for another repeat question’s relevant.

Bernard has a repeating group, and inside that group, there is a questions that is only answered if the previous question’s answer = 3.
The skip logic for this should look like:

The most important part is the relevant="" statement, which controls the skip logic.

relevant="/NFI_Tracking/A05/A05_05 = ‘3’

If you ever want to customize the skip logic in a way that KoBoForm doesn’t do automatically, there is a great feature for Hand Coding the skip logic. You just check the “Hand Code” box, and then you will get an open text box. You write in there whatever skip logic would go in between the quotes from relevant="…" Be sure to use a full Xpath expression starting with /.

Like this: /Instance/Group/Question = ‘value’

This function allows you to get around errors as well as do more creative things with your Skip Logic. If you want to learn more clever things to do with Skip Logic see the user guide.

Bernard should try that for getting around this issue today, but the fix should be up very quickly and you won’t have to worry about it anymore.

Best,

Neil Hendrick

···

On Wed, Jan 30, 2013 at 10:40 AM, Neil Hendrick neil.h...@kobotoolbox.org wrote:

Bernard,
After loading your form, i confirm your issue. Thanks for including your XML and a screenshot of the error, very helpful! We’ve made some improvements to the handling of skip logic within groups, but I will have to dig into this. Let me get back to you with a solution.

~Neil

On Wed, Jan 30, 2013 at 9:00 AM, Bernard Lukwiya luk...@gmail.com wrote:

Dear All,

Same old problem with skip logic, has anybody found out how to do this. I have tried about 5 times, each time creating a new form but I still get the same error (Not a valid question) see attached.

I have uploaded both my xml and the screenshots of the error I receive. Once I click okay, select my logic question, the answers don’t show.

I want to apply the skip logic on the next question appear(and prompt for price) If the item was sold.

Please help!!!

Bernard.

On Monday, August 13, 2012 8:24:40 AM UTC+3, Dustin Locke wrote:

Hey community,
I think I have figured out how to get the skip logic to work within the a repeat groups, but I would like to hear what your opinions are on the topic.
I have to go into the code, and the only thing that I can find that dictates the skip feature is in the region. Is the only thing I have to do is write the relevant = command at the end of the instance? Is there any other call outs that I need to be aware of to make this work? Does the repeat command come before the relevant = command or vice versa, or does it matter?

Ok I am going to try this out and hope for the best.
Hope to hear from someone soon.
Survey starts next Sunday in the Whitechapel district of London…

Cheers

Dustin

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at http://groups.google.com/group/kobo-users?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

Hendrick,

I hope you are well.

I know you are really busy, please let me know if you have found the solution around the problem below. I have tried contacting several other developers who confirm the problem but no solution has yet been found.

With you wide contacts, if you like, share the documents and the problem to the a larger audience in any community you can like. The information provided is not confidential! With several brains working on this, I hope this will be fixed sooner than later.

Best,

Bernard.

···

On Wednesday, 30 January 2013 22:14:18 UTC+3, Neil Hendrick wrote:

Bernard,
This is a great question, and it gives a look inside the slightly more complex skip logic required for operating within a repeating group.
I will explain here in some detail how this works.

First off, yes, there was a flaw in KoBoForm’s working with skip logic inside repeating groups, so kudos to the KoBoNauts who found this and brought it to the developer’s attention. We are fixing this right now and will push the changes to the online KoBoForm asap. The problem is with KoboForm not liking a question from a repeat as the value for another repeat question’s relevant.

Bernard has a repeating group, and inside that group, there is a questions that is only answered if the previous question’s answer = 3.
The skip logic for this should look like:

The most important part is the relevant="" statement, which controls the skip logic.

relevant="/NFI_Tracking/A05/A05_05 = ‘3’

If you ever want to customize the skip logic in a way that KoBoForm doesn’t do automatically, there is a great feature for Hand Coding the skip logic. You just check the “Hand Code” box, and then you will get an open text box. You write in there whatever skip logic would go in between the quotes from relevant="…" Be sure to use a full Xpath expression starting with /.

Like this: /Instance/Group/Question = ‘value’

This function allows you to get around errors as well as do more creative things with your Skip Logic. If you want to learn more clever things to do with Skip Logic see the user guide.

Bernard should try that for getting around this issue today, but the fix should be up very quickly and you won’t have to worry about it anymore.

Best,

Neil Hendrick

On Wed, Jan 30, 2013 at 10:40 AM, Neil Hendrick neil...@kobotoolbox.org wrote:

Bernard,
After loading your form, i confirm your issue. Thanks for including your XML and a screenshot of the error, very helpful! We’ve made some improvements to the handling of skip logic within groups, but I will have to dig into this. Let me get back to you with a solution.

~Neil

On Wed, Jan 30, 2013 at 9:00 AM, Bernard Lukwiya luk...@gmail.com wrote:

Dear All,

Same old problem with skip logic, has anybody found out how to do this. I have tried about 5 times, each time creating a new form but I still get the same error (Not a valid question) see attached.

I have uploaded both my xml and the screenshots of the error I receive. Once I click okay, select my logic question, the answers don’t show.

I want to apply the skip logic on the next question appear(and prompt for price) If the item was sold.

Please help!!!

Bernard.

On Monday, August 13, 2012 8:24:40 AM UTC+3, Dustin Locke wrote:

Hey community,
I think I have figured out how to get the skip logic to work within the a repeat groups, but I would like to hear what your opinions are on the topic.
I have to go into the code, and the only thing that I can find that dictates the skip feature is in the region. Is the only thing I have to do is write the relevant = command at the end of the instance? Is there any other call outs that I need to be aware of to make this work? Does the repeat command come before the relevant = command or vice versa, or does it matter?

Ok I am going to try this out and hope for the best.
Hope to hear from someone soon.
Survey starts next Sunday in the Whitechapel district of London…

Cheers

Dustin

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo...@googlegroups.com.

Visit this group at http://groups.google.com/group/kobo-users?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.