Copy several rows from one repeating table to another - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Copy several rows from one repeating table to another

Last post 09-17-2012 07:41 AM by JakeE. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 10-07-2011 11:53 AM

    Copy several rows from one repeating table to another

    I have found a way to select a row in a repeating table and transfer the data to another repeating table WITHOUT USING CODE. It was actually rather simple.

    Now I'm trying to figure out how I can get it to move several rows to another repeating table. Thus far all I have been able to get it to do is to copy ONE of the selected rows (the first or last selected) to another repeating table, coying that one row from the first table into several rows in the second table.

  • 10-08-2011 01:28 AM In reply to

    Re: Copy several rows from one repeating table to another

    Are you saying that both tables already have the same number of rows and you want to copy the data in one table to the other, or do you want to actually add rows to the destination table?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-10-2011 08:19 AM In reply to

    Re: Copy several rows from one repeating table to another

    Let's say I have a repeating table that has 4 rows. I want to select 2 of those rows and copy that data to a destination repeating table. The destination repeating table has only the one default row, until I add the other two rows from the source table with data. Right now I can copy a single row by clicking a checkbox, but it's just that one row.

  • 10-10-2011 10:31 AM In reply to

    Re: Copy several rows from one repeating table to another

    You can't do this with InfoPath's builtin functionality, but we have a time-tested way to accomplish this relatively easily with qRules.  If you can create a simple sample form to demonstrate the tables you want to copy, inject the trial version of qRules in it and attach it to this thread, I can modify it for you to demonstrate this technique.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-13-2011 11:06 AM In reply to

    Re: Copy several rows from one repeating table to another

    Thank you. I've injected qRules in my simple test form (attached). I've setup rules to copy the selected row from the first table to the second table, and that works fine. But when I want to select multiple rows from the first table via my checkboxes it doesn't copy each of the selected rows into the second table as desired.

     Looking forward to seeing what this can do. Also, is this solution supported in ShareVis? Also, in production, the first table I want to pull data from would be getting data from a query via a web service (I have a solution for that). Is that supported in qRules? Right now my web services are on an internal facing server.

  • 10-13-2011 12:13 PM In reply to

    Re: Copy several rows from one repeating table to another

    Here's your form with the copy behavior added.  All of the relevant logic is on the button that I added and in the rules on the my:group4 node.

    I can't say anything relating to ShareVis because this is the first I've heard of it and I don't know what its limitations are (or if they're relevant here).  And yes, this technique is perfectly applicable to copying data between data sources.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-03-2011 11:30 AM In reply to

    Re: Copy several rows from one repeating table to another

    Hi Jimmy. Do you think you could send me the information on how to copy from one repeating table to another.  I have the trial version of Qdabra.

    Thanks

    JS

     

  • 11-03-2011 11:51 AM In reply to

    Re: Copy several rows from one repeating table to another

    Hello JS,

    If you download the file I've attached above and inject your trial version of qRules into it, you should be able to sample the functionality I've added to it.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-03-2011 01:52 PM In reply to

    Re: Copy several rows from one repeating table to another

    Thanks Jimmy. That helped a lot. Just one question. What controls the mapping of the fields from one reparting table to the other?

    concat("Insert /parent=/my:myFields/my:group3 /child=my:group4 /count=", count(group2[selected = "yes"]))

  • 11-03-2011 03:53 PM In reply to

    Re: Copy several rows from one repeating table to another

    Jimmy. Skip that last question. I had missed the other functions. I am having trouble with the add rows command.

    My command is  (getting error):
    concat("Insert /dsname=BPCS_Bills /parent=/my:Quote/my:Item_Detail/my:Bill_of_Material  /child=/my:group10  /count=", count(BPCS_Bills[Selected = "yes"]))

     


  • 11-03-2011 03:53 PM In reply to

    Re: Copy several rows from one repeating table to another

    Jimmy. Skip that last question. I had missed the other functions. I am having trouble with the add rows command.

    My command is  (getting error):
    concat("Insert /dsname=BPCS_Bills /parent=/my:Quote/my:Item_Detail/my:Bill_of_Material  /child=/my:group10  /count=", count(BPCS_Bills[Selected = "yes"]))

     

  • 11-03-2011 07:33 PM In reply to

    Re: Copy several rows from one repeating table to another

    Hello JS,

     I reckon that the group you're actually adding to is in the main data source, in which case you would not use the /dsname parameter.  I reckon that if you check the Expand XPath option, you'll see that there's already an xdXDocument:getDOM("BCPS_Bills") in there to indicate that the count of those rows should be coming from the BCPS_Bills data source.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-14-2011 09:03 AM In reply to

    Re: Copy several rows from one repeating table to another

    Hello. I am trying to get this copy function working but I am not having success. I opened the CopySelectedRows form from the this forum string but the copy button does not seem to work.  I create records in the top repeatijng table and check the button but the copy button does not show anything on the lower table. 

    Any help would be appreciated. 

     

  • 11-14-2011 09:41 AM In reply to

    Re: Copy several rows from one repeating table to another

    The copy of qRules in that form is expired.  You'll need to download and reinject a new trial version or purchase the full version.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-14-2011 12:29 PM In reply to

    Re: Copy several rows from one repeating table to another

    Thanks. I was able to get that working and I am progressing a little.  My insert command is working but now I am getting an error on my set fields command.

    Any idea what might be wrong wiht my syntax:

     BPCS_Bills[selected = "true"][position() = count(current()/preceding-sibling::group10) + 1]/BPCS_Part 

    or

    @BPCS_Part[selected = "true"][position() = count(current()/preceding-sibling::group10) + 1] 

    My guess is the group10 is the problem??

     

     

     

     

     

     

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