Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / April 2007

Tip: Looking for answers? Try searching our database.

Populating fields according to drop-down selection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon L - 11 Apr 2007 13:40 GMT
Hello,

I have an InfoPath form, which currently displays all data from a secondary
data source in a
repeating section.

I would like to get the form to display information, depending on a value
selected from a dropdown
list, and have followed this tutorial, 'Automatically Populate fields from a
drop-down selection'
at
http://www.infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18
fb2c5bac85

but it hasn't worked for me.

Any help would be greatly appreciated.
thanks,
Simon
S.Y.M. Wong-A-Ton - 12 Apr 2007 07:40 GMT
Ordinarily you would use a filter on the repeating section and set the
selected value from the drop-down equal to a value from one of the fields in
the repeating section which would then automatically filter the repeating
section and show only those records that satisfy the filter condition, but
since the data from your repeating section is coming from a secondary data
source, you won't have this filter option available to you.

What you can do is something like I did in this article:
http://enterprise-solutions.swits.net/infopath2003/article.php?t=autofill-fields
-dropdown-selection-secondary-data-source&c=infopath2003


The downside is that you'll have to add each field you want to display and
hook it up to the drop-down using rules and filters, which can be a hassle if
you have many fields you want to display.
---
S.Y.M. Wong-A-Ton

> Hello,
>
[quoted text clipped - 13 lines]
> thanks,
> Simon
Simon L - 12 Apr 2007 10:32 GMT
Thanks for your reply. In my case though, I'd like to select a company from a
drop-down list, and then display all invoices for that company, whereas your
example only allows one colour to be displayed for each fruit selected.
Would it be possible to do this?
thanks,
Simon

> Ordinarily you would use a filter on the repeating section and set the
> selected value from the drop-down equal to a value from one of the fields in
[quoted text clipped - 29 lines]
> > thanks,
> > Simon
S.Y.M. Wong-A-Ton - 13 Apr 2007 06:56 GMT
If the invoices are in a database, you can bind your form to that database.
This will enable you to use the filter option (Properties dialog > Display
tab > Filter Data button) on a repeating table/section like I mentioned in my
previous post. This is the simplest (codeless) solution.

If you want to keep the data as coming from a secondary data source, you'll
have to resort to writing code to do the filtering for you and then populate
a group node in your Main data source in the OnAfterChange event for the
drop-down list box. You'll not only need to know how to write code, but also
how to use filters in XPath expressions. This may be a very challenging
solution to implement.
---
S.Y.M. Wong-A-Ton

> Thanks for your reply. In my case though, I'd like to select a company from a
> drop-down list, and then display all invoices for that company, whereas your
[quoted text clipped - 36 lines]
> > > thanks,
> > > Simon
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.