Reading lookup data from Sharepoint into repeating table - InfoPath Dev
in

InfoPath Dev

Reading lookup data from Sharepoint into repeating table

Last post 06-06-2014 12:48 AM by marculos. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-05-2014 03:17 PM

    Reading lookup data from Sharepoint into repeating table

    Hi, total noob here need help !!

     

    I have a list in sharepoint called consumables.
    Description            Price
    a4 paper               10
    a5 paper               12
    paper clips            25

    What I am trying to do is have a repeating table in an InfoPath Form where the user can select the description and the relevant price is displayed.

    The price is incorrect always e.g 10 when I select a different Product in each repeating table.

    Guess I am not understanding something here.

    Here is the xpath for the price field which is a lookup on the sharepoint list.
    xdXDocument:GetDOM("Consumables")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:cPrice[../d:Description = xdXDocument:get-DOM()/my:myFields/my:group7/my:group8/my:field16] 

     

    Any help would be most appreciated. 

  • 06-05-2014 03:54 PM In reply to

    Re: Reading lookup data from Sharepoint into repeating table

    Is group8 your repeating group? And field16 contains the description? And this is a default value on the price field which is in the same repeating group as field16

    If so, you want this:
    xdXDocument:GetDOM("Consumables")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:cPrice[../d:Description = current()/../my:field16] 

    If that isn't right, please feel free to attach your form template to the Options tab in a reply so I can take a quick peek at it and get you the right XPath.

     (PS - if this form is not in production, please go back through your main data source and give groups and fields meaningful names! It makes your life sooooooo much easier!)

    Hilary Stoupa

  • 06-05-2014 04:09 PM In reply to

    Re: Reading lookup data from Sharepoint into repeating table

     appreciate the help !

     Aplogise for the bad naming ! I have just renamed the repeating table.

     

    xdXDocument:GetDOM("Consumables")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:cPrice[../d:Description = xdXDocument:get-DOM()/my:myFields/my:group9/my:RepeatingTable/my:Item] 

  • 06-06-2014 12:48 AM In reply to

    Re: Reading lookup data from Sharepoint into repeating table

     Thank you very much Hilary, that has worked a treat !!

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