Issue with Inserting New Item in Repeating Table - InfoPath Dev
in

InfoPath Dev

Issue with Inserting New Item in Repeating Table

Last post 06-16-2011 09:38 AM by Konstantin. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-07-2011 01:27 PM

    • jbegic
    • Not Ranked
      Male
    • Joined on 06-06-2011
    • Cupertino California
    • Posts 14

    Issue with Inserting New Item in Repeating Table

    I have multiple fields in repeating table and one of them is called “DVTShipTo” which is a Drop-Down List. Under this control, I have 10 different Shipping locations.I have created Data Connection that pulls Contact Information from the SharePoint and based on my location selection, should auto-populate address information.Now… When I select Shipping Location to let’s Say “Location #1”, it would automatically auto populate address field correctly. The problem is, when I insert NEW ITEM in Repeating table… I have seen instances when it works fine but most of the time, it would display incorrect address.  Here is my Rule:Action => Set a field’s valueField => AddressValue => @Addy[DVTShipTo = @Factory] Does anyone know how to fix this issue?
    Thank You
    JBegic
  • 06-10-2011 08:16 AM In reply to

    Re: Issue with Inserting New Item in Repeating Table

    Your rule is on the DVTShipTo Field? Are you 100% sure that you have a set of unique @Factory field values? That is, if there were multiple addresses for the same factory, IP will return the first one it finds....

    You are going to have to do a bit of detective work so you can determine the conditions where you get an incorrect address....

    Hilary Stoupa

  • 06-13-2011 10:29 AM In reply to

    • jbegic
    • Not Ranked
      Male
    • Joined on 06-06-2011
    • Cupertino California
    • Posts 14

    Re: Issue with Inserting New Item in Repeating Table

    Thank you for your reply Hilary... I am still struggling with this and I do not have any answers to this problem yet.

     

    Here is more (important) info on this issue... I have 4 columns (Factory, Full Name, Address, Phone Number) I created in SharePoint List called “Contacts”.

    In InfoPath I have “DVTShipTo” Field which is a Drop-Down List Box (part of the repeating table) and I have checked “Show only entries with unique display names”. List Box choices are set to “Get Choices from an external data source” and it is pointing to my SharePoint List called “Contacts”.
    • Under Entries I have: /dfs:myFields/dfs:dataFields/dfs:Contacts
    • Value: @Factory
    • Display name: @Factory
    I have another Drop-Down List Box (part of the repeating table) called “FullName”. List Box choices are also set to “Get Choices from an external data source” and it is pointing to my SharePoint List called “Contacts”.  
    • Under Entries I have: /dfs:myFields/dfs:dataFields/dfs:Contacts[current()/my:DVTShipTo = @Factory and @Factory = current()/my:DVTShipTo]
    • Value:@Full_Name
    • Display name: @Full_Name 
    Now… In repeating table section first row, let’s say if I select Factory 1 from the  “DVTShipTo” drop-down field, this will filter items to show only Names associated with this factory under “FullName” drop-down field. Once I select the name, the "Address" field (part of the repeating table) will auto populate and this works perfectly each time. The problem is when I “insert New Item”/ row… When I pick the factory to filter the name, the address field now would be inaccurate. Here is the rule for that:
    • Condition: None
    • Rule type: Action
    • Run these actions: Set a field’s value
    • Field: Address
    • Value: xdXDocument:GetDOM("Contacts")/dfs:myFields/dfs:dataFields/dfs:Contacts/@Address[xdXDocument:get-DOM()/my:myFields/my:Builds/my:DVTBuild/my:FullName = ../@Full_Name]

    I hope there is simple solution for this problem and I am just missing some key points... Good thing to note, couple months ago I have started to work with SharePoint and this is my first project that involves Infopath

    Thank You
    JBegic
  • 06-14-2011 09:37 AM In reply to

    • jbegic
    • Not Ranked
      Male
    • Joined on 06-06-2011
    • Cupertino California
    • Posts 14

    Re: Issue with Inserting New Item in Repeating Table

    Problem solved with value:

    xdXDocument:GetDOM("Contacts")/dfs:myFields/dfs:dataFields/dfs:Contacts/@Address[xdXDocument:get-DOM()/my:myFields/my:Builds/my:DVTBuild/my:FullName = ../@Full_Name and ../@Full_Name = current()]

    Thank You
    JBegic
  • 06-16-2011 09:38 AM In reply to

    Re: Issue with Inserting New Item in Repeating Table

    current() - is reference to current record ../@Full_Name = current() - is incorrect correct use this function with field which value you want to compare f.e. current()/@Full_Name, but need to see what current repeated block is active
    --
    Sincerely yours
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.