update a row within a repeating table with data from another repeating table. - InfoPath Dev
in

InfoPath Dev

update a row within a repeating table with data from another repeating table.

Last post 09-01-2013 03:52 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-26-2013 08:27 AM

    • jorow
    • Not Ranked
    • Joined on 08-26-2013
    • Posts 7

    update a row within a repeating table with data from another repeating table.

    Hi, I have been trying to configure an infopath 2010 form where I have a repeating table built from a Sharepoint list which automatically completes rows based on entries within the list - basically when the form is opened a table is presented with several rows containing Expense Categories and their relevant codes. The form itself is for personal expenses so I have another Repeating Table which provides a dropdown selection containing Expense Categories (these are included in the Sharepoint list), so basically what happens is a user will complete rows in the first repeating table selecting the relevant Expense Category and entering an amount which will then update Category row in the second repeating table with a sum of the amount - using this formula - sum(xdXDocument:get-DOM()/my:myFields/my:Expenses/my:ExpenseItems/my:ExpenseAmount[current()/@Category = ../my:ExpenseCategory])

    I have now been asked to configure another repeating table that doesn't involve a drop down selection but is required to update one of the categories within the second repeating table but I am unable to workout how I can tell it what Category Row to update.  The new Repeating Table is for Mileage Expenses so anything entered into here needs to update the total of Mileage Expenses row.

    I hope I have managed to explain this OK but can provide more information if required.

  • 09-01-2013 03:52 PM In reply to

    Re: update a row within a repeating table with data from another repeating table.

    If the other repeating table is inside the current one, you can use the same current() technique to do it. Make sure you add a filter that selects the secondary data source first and then compare it to the actual selected value field in the main data source. You should end up with two current() expressions in your xpath. If not, try again as sometimes InfoPath infers the wrong thing. You can also manually add the filter using current() but it's trickier.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.