Repeating table using looked up values issues - InfoPath Dev
in

InfoPath Dev

Repeating table using looked up values issues

Last post 04-10-2010 12:34 AM by DarrylGould. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-09-2010 03:42 AM

    Repeating table using looked up values issues

    Hi I have a repeating table which I want to populate from the data in a SharePoint list. The SharePoint list has 5 fields:

    Title - Add 1 - Add2 - Add3 - Add4

    In InfoPath, the first cell of the repeating table contains the "Lender". This field is a drop down, that is populated from the SharePoint list field [Title].

    When the user selects a Lender, I want the other four fields from the SharePoint list to populate the corresponding fields in the InfoPath form.

    I am attempting to do this using a Rule on the Name field that populates the Address fields in the repeating table when there is a match in the SharePoint list, i.e.

    xdXDocument:GetDOM("Creditor list")/dfs:myFields/dfs:dataFields/dfs:Creditor_list/@Add_1[../@Title = xdXDocument:get-DOM()/dfs:myFields/my:LocalFields/my:UnsecuredLoans/my:Lender]

    The problem I am having is that the first row works fine. And the second row seems to be fine too, but when I add a third row the form puts the address field for the second row in as the third row addresses.

    Any ideas where I am going wrong?

    Thanks

  • 04-10-2010 12:34 AM In reply to

    Re: Repeating table using looked up values issues

    Looks like i have managed to solve my own problem

    It seems the issue was that I was not looking at the current "Lender". I looked into using Current, etc, but as I am not a developer, I just found that confusing. Instead, I did the following, which worked perfctly:

    I created a new dummy field in the form called "CurrentLender". Whenever a user selects a Lender from the dropdown, I use a rule to populate the CurrentLender field with the Lender name. I then use the rule to populate the Add1 field with the corresponding address for the CurrentLender field, rather than using the Lender field.

    As a new line is inserted and the user selects a new Lender, the CurrentLender is overwitten, and therefore the logic works for the new line.

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