Returns an index that indicates the position in a set. For example, for a table item this function determines which row of the table the compute is in. For a group (checkgroup or radiogroup), this function determines which item in the group the compute is in.

This function is part of the xforms package of functions, and must include the xforms. prefix.
Returns An integer representing the position in the set. The integer is onebased. This means that the first element/row returns a value of 1, the second a value of 2, and so on.
Example The following checkgroup uses the xforms.getPosInSet and xforms.getSizeOfSet functions to arrange the checks in two equal length columns. To achieve this, the x and y coordinates are computed for each item in the group as shown:
<checkgroup sid="color">
<xforms:select ref="color" appearance="full">
<xforms:label>Select the colors you like:</xforms:label>
<xforms:itemset nodeset="../choice">
<xforms:label ref="@show"></xforms:label>
<xforms:value ref="."></xforms:value>
<xforms:extension>
<itemlocation>
<x compute="floor((xforms.getPosInSet()  '1') / 

(ceiling(xforms.getSizeOfSet() / '2'))) * '60'"/>
<y compute="(xforms.getPosInSet()  '1') % 

(ceiling(xforms.getSizeOfSet() / '2')) * '20'"/>
</itemlocation>
</xforms:extension>
</xforms:itemset>
</xforms:select>
</checkgroup>
To calculate the x coordinate, the following algorithm is used:
 Calculate the size of the set, divide this number by two, then get the ceiling of that value.
This calculation determines the length of the first column, which is always longer if there is an odd number of items.
 Determine the position of the item in the set and subtract one.
This calculation returns a zerobased position in the set.
 Divide the position in the set by the length of the first row, then get the floor of this value.
This returns a zero if the position is less than the length of the first row, or a one if the position is equal to or greater than the length of the first row. This calculation works because the set is zerobased, so the first five items (04) return a zero because they are all less than 5.
 Multiply by 60.
This calculation returns an x coordinate of zero if the item is in the first column, or an x coordinate of 60 if the item is in the second column, effectively indenting the second column.
To calculate the y coordinate, the following algorithm is used:
 Calculate the size of the set, divide this number by two, then get the ceiling of that value.
This calculation determines the length of the first column, which is always longer if there is an odd number of items.
 Determine the position of the item in the set and subtract one.
This calculation returns a zerobased position in the set.
 Get the modulus of the position in the set divided by the length of the first row.
This calculation returns zero for the first item, one for the second, two for the third, and so on. When the end of the first row is reached, the modulus begins again at zero.
 Multiply by 20.
This determines the y coordinate, so the first item has a y coordinate of zero, the second a y coordinate of 20, and so on. The second row resets at zero and begins the count again.
