Need to ask users to select one row in a repeating table? Then you’ll want to see the screenshots below. There are four simple components:
- Repeating table has “rowNum” with default value formula to dynamically calculate a row number. “count(../preceding-sibling::*) + 1” can be entered with XPath mode.
- Main non-repeating “selectedRow” field outside of the table. Will store the user selection.
- “Make Primary” button in the repeating table. Action rules here update the “selectedRow” number.
- “icon” section to show the actively selected row. Formatting rules here show it only when selected.
Now when a user clicks the “Make Primary” the main non-repeating “selectedRow” value will be updated to have the number of the actively selected row. Formatting rules will hide the button and display a green check mark instead. This provides user feedback and makes for a more intuitive experience.
Also, this solution could be extended with checkbox icons for a more seamless feel. Simply change the regular “Make Primary” button to a picture button with an image with an unchecked box. Then update the section to have an image of a fully checked box. There are many options to format the active/de-active row display.
CLICK HERE to download the XSN file