Copy contents from one repeating table to another one - InfoPath Dev
in

InfoPath Dev

Copy contents from one repeating table to another one

Last post 12-16-2011 02:38 AM by LailaH. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-15-2011 06:09 AM

    Copy contents from one repeating table to another one

    HI!

    I am trying to figure out how to copy contents from one cell in a repeating table to another repeating table. This is to save users having to put in repetitive values.
    Ideally users enter all values in table 1, then click a button I make, and all those values are copied down automagically.

    Example:

    Table1:
    ------------------------------------------------
    Label1  |   Value1    |    Value2
    -------------------------------------------------
    Label2  |                 |   
    -------------------------------------------------
    Label3  |                 |   
    -------------------------------------------------
    Label4  |                 |   
    -------------------------------------------------

    Table 2: (all values in first column is copied in, not written)
    ------------------------------------------------
    Label1  |                |   
    -------------------------------------------------
    Label2  |                 |   
    -------------------------------------------------
    Label3  |                 |   
    -------------------------------------------------
    Label4  |                 |   
    -------------------------------------------------

    There is a function for "set value as" where I can use table1/column1 as source, and table2/column1 as recipient.
    But problem is it only uses the first rows value, i.e. all rows in table 2 would have value "Label1". Not quite what I was after.

    Any clever people out there who can give me some tips on how to solve this pickle? Thanks!

  • 12-15-2011 08:30 AM In reply to

    Re: Copy contents from one repeating table to another one

    Hi there,

    Not sure if this will work for your particular scenario, but if all you want is a direct copy of your repeating table you could simply have a second repeating table control bound to the same fields as the first one.  This will make sure that both controls display the same data.  You could even have the second one set to read-only so the user can only edit the values in the first tables and not the second.

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 12-16-2011 02:38 AM In reply to

    Re: Copy contents from one repeating table to another one

    Hi, thanks for your suggestion :)

     I want to copy the contents of column 1 (labels), but not the rest of the columns.

    I like your suggestion though, and will try to bound Table2/Column1 to the same field as Table1/Column1. I believe I can still bind the other columns in Table2 to new fields.
    I agree with setting it to read-only then.

    The consideration then is whether this it too limiting. Initially I wanted to do a copy to save users tedious work, e.g. having to copy 23 labels 4x. And then they could add and remove rows as they please beyond that copy.

    I was thinking of a solution where the contents in table 1 is copied to a table or matrix not visible in the form, a behind-the-scenes support, by traversing, but this is also a bit complicated and has shortcomings.

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