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