Find the position of a value

how to find the position of a value in una answer?

Hola Eladio!

Se refiere a cĆ³mo encontrar la posiciĆ³n de un valor en un grupo de repeticiĆ³n? (no entiendo a quĆ© se refiere 'una answer'). Si se refiere a la posiciĆ³n de un valor en un grupo de repeticiĆ³n se puede encontrar el proceso aquĆ­: Advanced Functions for Repeat Groups - CommCare Public - CommCare Public

In a hidden value, the position function (position ()) placed in a calculate condition will return the position of a question in a repeat group (i.e., first, second). The position function is zero-indexed meaning that numbering starts with zero (0) and continues.

Example: applied to a question such as "Please enter the name for the child" would return zero(0) if referencing the first "child" in a four (4) children position.
Note: The position function should not be used on a label ("Child") that is duplicated in a repeat group. Numbering can be modified by adding (+ integer) to the string respectively. (Example: position(..)+1 ensures numbering starts at one (1).

TambiĆ©n se puede usar la funciĆ³n selected-at (CommCare Functions - CommCare Public - CommCare Public) para identificar valores seleccionadas dentro de una pregunta casilla

1 Like

Mil Gracias, he resuelto.

1 Like