Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

InfoPath – Repeating Table Select One Primary Row

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:

  1. Repeating table has “rowNum” with default value formula to dynamically calculate a row number.   “count(../preceding-sibling::*) + 1” can be entered with XPath mode.
  2. Main non-repeating “selectedRow” field outside of the table.  Will store the user selection.
  3. Make Primary” button in the repeating table.  Action rules here update the “selectedRow” number.
  4. 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.

xsn16

   CLICK HERE to download the XSN file

 

image
image
image
image
image
image
image
image

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲