Error creating repeating groups

Hello can you help me solve this error:

error 400: b’{“detail”:“ODK Validate Errors:\n>> Something broke the parser. See above for a hint.\nError evaluating field ‘noteError’: The problem was located in Relevant expression for ${noteError}\nXPath evaluation: type mismatch \nindexed-repeat(): parameter 2 must be a parent of the field in parameter 1\nCaused by: org.javarosa.xpath.XPathTypeMismatchException: The problem was located in Relevant expression for ${noteError}\nXPath evaluation: type mismatch \nindexed-repeat(): parameter 2 must be a parent of the field in parameter 1\n\t… 11 more\n\nResult: Invalid”}’

Hello,
without your relevant code (and referenced repeat group), it will be difficult to provide more help than the detailed error message you have got. There is a structural refernce problem in your relevant code for your variable noteError…
Would you mind to also have a look here https://docs.getodk.org/form-repeats/

Hello, I share my xlsform so you can take a look and maybe you can help me solve the problem

prueba semana.xlsx (12.8 KB)

Hello,
your syntax and arguments do not follow the rules for the (nested) indexed-repeat function:
indexed-repeat(//node, /path/to/repeat, //index1,
/path/to/repeat/nested-repeat, //index2)
See https://getodk.github.io/xforms-spec/#fn:indexed-repeat

See also https://docs.getodk.org/form-operators-functions/#indexed-repeat
indexed-repeat( name, group, i [, sub_grp, sub_i [, sub_sub_grp, sub_sub_i ] ] )

Your example is
indexed-repeat( ${weekDaysTotal}, ${repeatMes}, ${conteo_mes_control}, ${repeatSemanal}, position(…) )
The first index is missing and I think you also mixed up the repeat-parent references. weekDaysTotal is a child of repeatSemanal (not of repeatMes).
Have a safe week-end

1 Like