Auto Fill Repeating Table Column - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Auto Fill Repeating Table Column

Last post 05-04-2017 07:56 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-19-2017 07:30 AM

    Auto Fill Repeating Table Column

    Situation: A user fills in an integer column in the first row of the repeating table, the table already contains the correct number of rows, they would then like to click a button and have remainder of the column in the table automatically populated with increasing numeric values.

    Primary Objective: Create a button which populates the remaining rows and is only clickable once the first row has been filled in.

    Stretch Objective: Have the button also submit each row of data to the main data connection so that back-end workflow can save it to the correct location.

    Issue: I am unable to correctly configure the rule to fill in the rows at all, I have seen a tutorial which discusses looping through a repeating table and submitting each row but again I am unable to replicate it. This must all be done using rules and no code due to limited publishing rights on a SharePoint environment.

     Any help is very much appreciated and gratefully received.


  • 05-03-2017 03:25 PM In reply to

    Re: Auto Fill Repeating Table Column

    Howdy - sorry this didn't get answered. Are you still working on this?
    Hilary Stoupa

  • 05-04-2017 01:19 AM In reply to

    Re: Auto Fill Repeating Table Column

    Hi Hilary,

    I do apologise I should have returned to detail how I solved this. I didn't manage to create a button which filled them all out as I hoped, this appears to be due to the lack of relationship between the button and the rows.

    My solution (using Rules):

    1. Button click sets a control field in the repeating table to a value (this actually updates every row)
    2.  Rule on the updated field sets the value of the field I wanted to update for just that row
      • The formula used: /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:FirstValue[../d:ID = xdMath:Min(../d:ID)] + count(../preceding-sibling::d:SharePointListItem_RW/d:ValuetoUpdate)
    3. Further rules reset the control field to it's previous value

    I have other rules so that only empty rows are updated, this will either start with a 0 if the first row isn't filled in or go on from a given value if the first row is filled in.

  • 05-04-2017 07:56 AM In reply to

    Re: Auto Fill Repeating Table Column

    That's a great solution! I use helper fields like this in repeating tables too. The behavior of buttons depends on their context (as you've found). If the button is sitting inside a section bound to a repeating group, it will affect just "this" instance. If it is outside the repeating group, it affects all instances. :)
    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.