Steps
Double click the drop down list box and select the data source connection you created for the SharePoint list to retreive data from
Click the RULES button to create a rule for this drop down list box
Add rule - add condition - action (select the field's value as) - field (select the field you want have the display. In this case its item description text box)
Click on Fx button to insert formula - click insert field group - select data source (secondary) - select description field - click on filter data button - click add - select ID from secondary data source is equals to Description from the secondary data source
Click on OK button untill you return to following screen
Click on EditXPath (advanced) check box and change the code as follows
xdXdocument:GetDOM("Inventory Item")/dfs:myFields/dfs:dataFields/dfs:Iventory_Item/@Description[../@ID = current()]
Finally when you see the preview of created InfoPath form, you should be able to retrieve Item description by selecting Item code in drop down list box.
You are very kind to share your expertise. I live in Indianapolis, Indiana, United States of America. I am a beginner in Infopath development. Thank you for these instructions.
ReplyDeleteIndianapolis is a very boring town.
ReplyDeleteAs boring as your boring comment?
ReplyDeleteThank you, :)
ReplyDeleteThanks a lot!
ReplyDeleteYour post saved us a lot of time.
It was very descriptive!
Thanks so much for this post! Helped me tremendously! KD - San Francisco, CA USA
ReplyDeletenice tutorial!! but how do you clear the textbox when you select a different item from the dropdownlist?
ReplyDeleteHello SharePoint Shrilanka,
ReplyDeleteThank you so much for your post. I'd appreciate about that.
@By the way, I found one post mentioning about clearing the field named MyField with VB:
Dim root As XPathNavigator = MainDataSource.CreateNavigator()
Dim textbox As XPathNavigator = root.SelectSingleNode("/my:myFields/my:MyField", NamespaceManager)
MyField.SetValue("")
Very nice - thanks for sharing!!
ReplyDeleteHI,
ReplyDeleteI have similar requirement.but in my case I have a dropdown list which has sharepoint list as a datasource and there is a button to insert the dropdown list selected value into the repeating table(we can insert multiple dropdown list values in repeating section).
Now I replaced one of list item values from xxx to yyy in datasource(sharepoint list). the updated list item are coming the infopath dropdown list. But the old listitem value(xxx) what I have inserted earlier in the repeating section is not getting changed. can you help me in this?
Note: I have removed the dataconnection and added it again to refresh.
Also I am using same dataconnection variable in repeating section what i am using to the dropdown list values.
saved me alot of time. nice and clear
ReplyDeleteI have been working this for a week and I cannot get this to work. I made a simple infopath sheet and a SP list. I need the drop down box to have all the ID #s for the SP list to show (which they do) Once I pick one from the list I need it to pull from the SP list and put it in an infopath text box. It should be easy, I have found plenty of directions on it, but the closest I have come to getting this is that it will display the first last name in the SP list but when I change the drop down it will not update. Also I tried your method and when I get to the filter, I get an error that the dropdown box is not allowed to have a filter on it. Please help me before I rip my hair out! :)
ReplyDeleteYor are my Hero....
ReplyDeletei had to change the place where you say ID to use the actual title field of the sharepoint list column - using ID would not work for me
ReplyDeleteHello dir.
ReplyDeletethis tutorial has very very help me and best technique
regarding xdXdocument:GetDOM("Inventory Item")/dfs:myFields/dfs:dataFields/dfs:Iventory_Item/@Description[../@ID = current()]
thanks
Thank you. Your help is appreciated.
ReplyDeleteThanks! This is a related post on how to get filtered values from SharePoint list column in InfoPath text field -
ReplyDeletehttp://www.sharepointbreak.com/2012/12/06/get-filtered-values-from-sharepoint-list-column-in-infopath-text-field/
Hi
ReplyDeleteI have a similar scenario but I'm facing error in the XML saying :
'Current' is not a valid XSLT or XPath function.
xdXDocument:GetDOM("Value Stream1")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Project_x0020_Manager[../d:ID = -->Current()<--]
I have a TEAM dropdown menu from SP list and the Project manager should be filled based on the team.
In the Team SP List I have Team names and respective Project manager.
Using Infopath 2010. Any help would be great.
I have InfoPath 2013. a list in SP2013 with over 800 entries and several columns containing data. if my user picks e.g company ID I would like company name, address, zip, town etc to be filled in automatically in my text boxes. how?
ReplyDeleteYou're my hero! Thanks!
ReplyDelete