During the first repeat index, relevant conditions work fine that are coded as follows:
Few Examples:
relevant = ${hh_age}>12
relevant = ((${hh_gender}='1') and (${hh_mar}='1') and (${hh_have_child}='1'))
relevant= ((${hh_child_outside_age}>12) and (${hh_child_outside_mar}='1'))
However, during second repeat (index) and onward, the conditions don't work at all.
Please guide, since I believe there maybe some syntax that would be different for conditions in repeat.
Do you use the relevant expressions in the same repeat group where the fields are obtained?
Please provide a sample with both fields (${hh_age} etc.) and relevant expressions utilization. Repeat groups and groups must be represented.
Thanks
Please try typing in the search field of this forum (the hand lens icon in the upper right) the following words and you will find several posts dealing with relevancy in repeat-groups offering solutions: relevant, repeat
Actually, in this case using the XPath selected() function instead of an XPath ${foo}='bar' expression wont make a difference. selected() is functionally equivalent to an '=' equality test for everything except when looking up values from a select_multiple. In select_multiple all the chosen values are stored in a single string, separated by a '|' delimiter; selected() scans this string for complete matches (unlike contains() which does a substring match). So if there is only even one value - eg select_one or pretty much any other data type which store a single value - then selected() will return the same result as '='.
Which is to say, Ayub's problem with repeat group relevance tests lies elsewhere...