Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Fix to relevant and fieldlist groups #11

Closed
jluis859 opened this issue Mar 21, 2012 · 1 comment
Closed

Fix to relevant and fieldlist groups #11

jluis859 opened this issue Mar 21, 2012 · 1 comment

Comments

@jluis859
Copy link

This code in data.js:
if (relevance.length > 0 )
binding.attrs.relevant = '(' + relevance.join(') and (') + ')';

Should be:
if (relevance.length > 0 )
binding.attrs.relevant = '(' + relevance[relevance.length-1] + ')';

Because when you create a field list group (maybe only a group) it will add the previos relevance of a question and it has some troubles when you show the information.

And example without fix:
< bind nodeset="/data/Refresco/edad" type="select1"/>
< bind nodeset="/data/Refresco/edadanios" type="string" relevant="(/data/Refresco/edad=1)"/>
< bind nodeset="/data/Refresco/edadmeses" type="string" relevant="(/data/Refresco/edad=1) and (/data/Refresco/edad=2)"/>
without fix the second question wont appear.

And with the fix:
< bind nodeset="/data/Refresco/edad" type="select1"/>
< bind nodeset="/data/Refresco/edadanios" type="string" relevant="(/data/Refresco/edad=1)"/>
< bind nodeset="/data/Refresco/edadmeses" type="string" relevant="(/data/Refresco/edad=2)"/>

But I would like to know your opinion.

I tested with relevance group and this continues working.
Maybe with nested groups does not work, I didnt test it.

After this I'm trying to refresh the windows in the collect when a question has relevant in a fieldlist group, but this is another story =).

Greetings

@issa-tseng
Copy link
Member

Looks like this was fixed with 5ee00d7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants