Automatic field insert - InfoPath Dev
in

InfoPath Dev

Automatic field insert

Last post 09-08-2005 08:02 AM by vt_asparagus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-02-2005 10:58 AM

    Automatic field insert

    Hi,

    How do I link 2 fields so that if field 1 contains text, field 2 will automatically fill with a corresponding text. For example, I have two fields called "contact name" and "e-mail address". Once I select a contact name, I want the "e-mail address" field to automatically insert the e-mail address corresonding to that contact name.
  • 09-02-2005 12:46 PM In reply to

    Use the OnAfterChange event on the Contact Name field. To quickly add an event, double click on the field, click on data validation button, there is an events dropdown, select OnAfterChange and press the edit button. In that event handler, go out to whatever datasource you have and get the e-mail address.

    You cannot use the other two events listed in that dropdown because the DOM is locked and no changes can be committed.
    Jason
    http://www.k2distillery.com/
  • 09-08-2005 06:20 AM In reply to

    Thanks for your help vt_asparagus.

    Could you give me an example of what I should put in the event handler? The email address field that I have is a drop down menu with options of various e-mail addressess but I want this to be automatically selected when the contact field is selected. Please help. I'm very new to Jscript.

  • 09-08-2005 08:02 AM In reply to

    Where are you planning to retrieve the email address from? Is the email address in a database (access, sql server), is it being returned from a web service, do you want to get it from active directory? Having that information will dictate the code that needs to be writting in this event handler.
    Jason
    http://www.k2distillery.com/
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.