AWS - Repeat groups


I’m building an embedded web server using the AWS tools. I have a problem when using repeat groups with dynamic form input items. The first time the page is called, the index for the Get functions is found in IndexValuesPtr[0]. Pressing a ‘submit’ button to update the values in the form, I must use the indices found in theIndexValuesPtr[1] to store the data. For every subsequent Get/Set the indices to use are found in theIndexValuesPtr[k] where k is incremented every time the submit button is pressed. How can I prevent that from happening? How can I make sure the indices are always found in IndexValuesPtr[0] for both the Get and the Set functions of a form input field.

The HTML tags I use are: