Repeating Table: How to Pass a Variable from Form #1 to Form #2 and Populate Each Row With that Value. - InfoPath Dev
in

InfoPath Dev

Repeating Table: How to Pass a Variable from Form #1 to Form #2 and Populate Each Row With that Value.

Last post 03-25-2010 11:59 AM by cdavis. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-25-2010 10:44 AM

    Repeating Table: How to Pass a Variable from Form #1 to Form #2 and Populate Each Row With that Value.

    I am fairly new to InfoPath.  Hopefully, I can explain this correctly.

    Summary:

    I have two forms.  The first form collects data.  The users then clicks a "Continue" button that submits the data to a SQL server, then open the second form programmatically while passing a key field value to this second form.  I have a Design Number that is passed to this second form.  The second form contains a repeating table.  The first column of the repeating table needs to have the passed-in value.  If I leave the repeating table at one row and submit data it works.  However, when I "Insert Another Row" the first column is blank and the submit does not work.

     

    Question:

    How do I force the 1st Column of the repeating table to contain this value by default for each and ever row?

     

    I have seen a few responses and tried their suggestions and I can't get it to work.

     

    Thanks in advance!

  • 03-25-2010 11:12 AM In reply to

    Re: Repeating Table: How to Pass a Variable from Form #1 to Form #2 and Populate Each Row With that Value.

    You should be able to use that field's Default Value formula to accomplish this.  You'll need to store your Design Number somewhere so that the formula can access it at any time.
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-25-2010 11:19 AM In reply to

    Re: Repeating Table: How to Pass a Variable from Form #1 to Form #2 and Populate Each Row With that Value.

     When I use the default value it will place the value in the column for each row, however, when I clicked the submit button the values disappear in all rows except the first and then I get an error message about missing a required field for my database.

     

     

  • 03-25-2010 11:26 AM In reply to

    Re: Repeating Table: How to Pass a Variable from Form #1 to Form #2 and Populate Each Row With that Value.

     Could this be because the field outside the repeating table where you're storing the Design Number is getting reset when you click Submit?  You can probably get around this by unchecking the "Update this value when the formula's value changes" checkbox, but you'll probably want to look into why this is happening.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-25-2010 11:59 AM In reply to

    Re: Repeating Table: How to Pass a Variable from Form #1 to Form #2 and Populate Each Row With that Value.

     I added a field (that wasn't  tied to a data source) outside of my repeating table to store the passed variable.  I named it roDesignNo.

    Therefore, the data structure looks like:

    myFields

      queryFields

      dataFields

        tblDetailsInfo

          [Fields...]

        my:roDesignNo

     

    I am accessing another field like this:

    "/dfs:myFields/dfs:dataFields/d:tblDetailsInfo/@plDesc"

     

    I am not having any luck accessing the roDesignNo (created field)?  Any ideas?  I think if I can get past this then I may be able to keep the value for the repeating table consistently for each row.

     

    Thanks!

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