Copy Filtered Repeating Table to Another Repeating Table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Copy Filtered Repeating Table to Another Repeating Table

Last post 09-11-2012 02:40 PM by Hilary Stoupa. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-11-2012 01:37 PM

    • JakeE
    • Not Ranked
    • Joined on 08-30-2012
    • Posts 17

    Copy Filtered Repeating Table to Another Repeating Table

    I have a SP List and I've copied the data to a repeating table in my main data source. I then filter the data based on checkbox selection and I'd like to copy only the filtered values to another repeating table. How can this be accomplished?

  • 09-11-2012 02:11 PM In reply to

    Re: Copy Filtered Repeating Table to Another Repeating Table

    Hi - are you using CopyTable?

    You can use a filter on the rowsrc parameter - like:

    /rowsrc=my:group2[../my:Checkbox='true']

    Hilary Stoupa

  • 09-11-2012 02:21 PM In reply to

    • JakeE
    • Not Ranked
    • Joined on 08-30-2012
    • Posts 17

    Re: Copy Filtered Repeating Table to Another Repeating Table

    I am using CopyTable.

    Can the filter on the rowsrc parameter compare two fields? If so, I think that will be my solution.

  • 09-11-2012 02:26 PM In reply to

    Re: Copy Filtered Repeating Table to Another Repeating Table

    Well, if I understand you correctly, you may need to use a concat statement. So your command may be something like this:

    concat("CopyTable /dsnamesrc=MySharePointList /tablesrc= /dfs:myFields/dfs:dataFields /rowsrc=d:SharePointListItem_RW[d:Title='", FieldWithValue, "'] /tabledest=/my:myFields/my:group3 /rowdest=my:group4 /empty=yes")

    So, let's pretend FieldWithValue is in another data source and the value is Test. The above concat would send a command that actually has the value of:

    CopyTable /dsnamesrc=MySharePointList /tablesrc= /dfs:myFields/dfs:dataFields /rowsrc=d:SharePointListItem_RW[d:Title='Test'] /tabledest=/my:myFields/my:group3 /rowdest=my:group4 /empty=yes

    Does that make sense?

    Hilary Stoupa

  • 09-11-2012 02:29 PM In reply to

    • JakeE
    • Not Ranked
    • Joined on 08-30-2012
    • Posts 17

    Re: Copy Filtered Repeating Table to Another Repeating Table

    Additionally, is is possible to have multiple filters in the rowsrc parameter?

    For example:

    /rowsrc=my:group2[../my:Checkbox1='true'] OR [../my:Checkbox2='true']

  • 09-11-2012 02:35 PM In reply to

    • JakeE
    • Not Ranked
    • Joined on 08-30-2012
    • Posts 17

    Re: Copy Filtered Repeating Table to Another Repeating Table

    I might just be over complicating things. It might just be easier to add a 'select' checkbox to the repeating table so I only have one field to test before using the CopyTable command for my final destination.

     

    Thanks for pointing me in the right direction Hilary!

  • 09-11-2012 02:40 PM In reply to

    Re: Copy Filtered Repeating Table to Another Repeating Table

    Your filter would actually look like this:

    /rowsrc=my:group2[../my:Checkbox1='true' or ../my:Checkbox2='true']

    The case of the "or" matters. You can always get InfoPath to figure out the syntax for you in an expression box - that's how I learned XPath. :-)

    Hilary Stoupa

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