This came up on an internal mailing list:
We have a secondary data source that holds a list of entries; part of the data in the list - a name field - is used to populate the items in a listbox in the view. When the user selects an item in the list, I want the rest of the data from that entry to be used to populate the form's main data source.
Great scenario! It actually can be done with a combination of rules and filters (though I admit it’s not obvious), so you don’t have to write code for it.
For this example, I will assume you have a form with:
What you’ll need to do is create a rule on the dropdown. The rule will set the value in the textbox by filtering the corresponding value in the secondary data source down to one that matches the dropdown selection.
Here’s how to do it:
Note that if your dropdown is inside a repeating section/table, then you will need to manually adjust the value in the formula dialog after step 11 to use the “current()” function so the filter works correctly.
PingBack from http://boxingcarsblog.info/infopath-team-blog-auto-fill-from-list-box/
PingBack from http://carsmaxblog.info/infopath-team-blog-auto-fill-from-list-box/
I AM SRINIVAS WORKING IN AVVAS INFOTECH, I WANT TO FILL THE DATA IN LIST COLUMNS AUTOMETICALLY BY USING THE ANOTHER LIST.. PLEASE GIVE ME A DETAILED EXPLANATION
So seriously -- how do I do this?
"In the Filter dialog, set the filter to “secondary-data-source-ID is equal to main-data-source-ID”
I am using infopath 2010 and have server issues like -1) when I double click a field I do not get its properties 2) In the properties window I can find there is no "Rules" button - the only rules button is on the Ribbon. Then of course the fact that the fiter dialog makes me pick fields. If I choose the option to have it let me enter an expression and enter "secondary-data-source-ID is equal to main-data-source-ID” EXACTLY as it is here minus the quotation marks it tells me I have an error.
Is there any way to implement the
Autofill for fields, like google search, using data from SQL table?