Populate E-mail Drop Down List based on other Drop Down List

D

Dunzo Salcedo

I have a Drop Down List that has two categories: Category 1 and Category 2.

I created two data connections, one to connect to Sharepoint Teamsite A's
Contacts in, the other to connect to Sharepoint Teamsite B's Contacts. Both
contact lists include first, last, full and email addresses.

Within InfoPath, would there be a way to create an 'if..then' statement to
say if category = Category 1 then use Teamsite A's Contacts, if category =
category 2, then use Teamsite B's Contacts? If so, where and how would I do
this?

The reason I need this is I created a submit button that emails based off of
the Contacts so it would be really REALLY helpful for me to be able to use
the category to generate the appropriate list of Contacts.

Any help would be much appreciated!
Thanks!
 
S

S.Y.M. Wong-A-Ton

You can write the logic in code to do a check on which category was selected,
and based on the category selected, loop through all the contacts in either
the first or second secondary data source, and generate a recipients list
from that by doing something similar as I did in this article:
http://enterprise-solutions.swits.n...-email-addresses-list-vbscript&c=infopath2003.

If it is a drop-down you want to populate with emails of either the first or
second secondary data source, then you must create a repeating group in your
Main data source, bind the drop-down to it, and then fill the repeating group
through code using the logic of which category was selected, performing an
XSL transformation on either the first or second secondary data source to
conform to the structure of the repeating group in the Main data source and
fill it. You may find this article useful:
http://enterprise-solutions.swits.n...ata-secondary-data-source-xslt&c=infopath2003
 
S

S.Y.M. Wong-A-Ton

Yes, my site tends to go down sometimes, and especially when it is too busy.
I do not have much control over that, sorry. You may want to try to access it
at another time. In the meantime, try the pointers that I gave you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top