Populating a field - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Populating a field

Last post 09-15-2006 03:30 AM by Stavi. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-15-2006 02:36 AM

    • ragav_in
    • Not Ranked
    • Joined on 09-15-2006
    • India
    • Posts 3

    Populating a field

    Hi all,

    I have an InfoPath form which has for example two fields. One is a drop down with 4 names and other is a field for their e-mail ID.

    Name:
    abc
    def
    ghi
    jkl

    If I chose abc in the name field, my email field should be populated as abc@mycompany.com and if I chose def, then it should be populated as def@mycompany.com and so on....

    Is this possible and if yes, how? Do I need to have a drop down list for the email ID also, or is it enough to have a text field?

    Your help is highly appreciated and millions of thanks in advance.

    Regards
    Subramanian
  • 09-15-2006 03:10 AM In reply to

    • Stavi
    • Top 100 Contributor
    • Joined on 12-13-2005
    • Posts 95
    I can think of two ways

    I would leave email as a text field

    Then add rules to the name field
    If name = abc then set email = abc@mycomany.com

    Or have email default value = concat(name, "@mycompany.com") and tick update when change
  • 09-15-2006 03:14 AM In reply to

    • Stavi
    • Top 100 Contributor
    • Joined on 12-13-2005
    • Posts 95
    You would have to add 1 rule per name, so thats probably not the best way

    Use the concat way
  • 09-15-2006 03:14 AM In reply to

    • ragav_in
    • Not Ranked
    • Joined on 09-15-2006
    • India
    • Posts 3
    Hey Stavi,

    The first option has done it for me. Anyways I would try the second one also. Thanks once again for your effort.

    Subramanian
  • 09-15-2006 03:30 AM In reply to

    • Stavi
    • Top 100 Contributor
    • Joined on 12-13-2005
    • Posts 95
    yeah the rules works ok for 4 names, but if it grows you will have to add a rule everytime a name gets added which I imagine will happen

    The concat way avoids this by taking the name automatically
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.