1 field choice populates another field - InfoPath Dev
in

InfoPath Dev

1 field choice populates another field

Last post 04-04-2013 12:45 PM by Daniel Clarke. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 03-15-2013 01:16 PM

    1 field choice populates another field

    Hey,

    I am currently working on a form that needs to be able to do the following:

    User selects an employee from a drop down list that is being poplated from a SharePointList, that choice populates another text box with that users email address which could also be included in the SharePoint list if needed or if there is a better suggestion please let me know. 

    Thanks in advance

    -Daniel

  • 03-15-2013 10:03 PM In reply to

    Re: 1 field choice populates another field

    Hi Daniel,

    Let's say you have two fields - Employee Name (dropdown) and Employee Email (text box). And your SharePoint List has this:

     Full Name                        Email

    John Smith            John Smith's email

    You need to add a rule in the Employee Name dropdown that sets the Employee Email field equal to the email of the user in the SharePoint list filtered by Full Name (SharePoint List) =  Employee Name (main data source).

    The rule will look something like: EmployeeEmail = Email[Full Name = EmployeeName].

     Let me know if that works for you.

    Jo-Anne

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 03-18-2013 09:12 AM In reply to

    Re: 1 field choice populates another field

    Hey Jo-anne,

    Thank you for this, I will test this out later today or tomorrow and let you know!

     **EDIT**

     Ok, i'm not sure I follow this, sorry I'm still learning this stuff......here is what I currently have going on:

     I have a SharePoint List with three columns: Company Name, Manager Name, E-Mail

    In my InfoPath form I have three fields the first field is Current Company and is a drop down field, I would like them to be able to select the company from that drop down and then have the next two fields: Manager and Email Address auto populate with the correct information based on what is in the SharePoint list for that company.

     I have tried what you suggested but I am not getting any results from it.....

    Thanks in advance

    -daniel

  • 03-20-2013 01:02 PM In reply to

    Re: 1 field choice populates another field

    Bump...
  • 03-20-2013 02:15 PM In reply to

    Re: 1 field choice populates another field

     Attach your template under the Options tab on a reply and I can give you a quick hand. :)

    Hilary Stoupa

  • 03-21-2013 07:28 AM In reply to

    Re: 1 field choice populates another field

    I have attached the file, thanks you so much! :)

     -daniel

  • 03-21-2013 08:29 AM In reply to

    Re: 1 field choice populates another field

     Save the attached file locally and then right click and select design to open in design mode. From there, you can see the rules I put on current company and preview to check it out.

    Hilary Stoupa

  • 03-21-2013 10:03 AM In reply to

    Re: 1 field choice populates another field

    Hilary,

    Thank you so much, I am swamped today and will take a better look tomorrow but it looks exactly like I needed it to be, hopefully now I can duplicate that for the other side! :)

     Will comment tomorrow on my results, again THANK YOU!

     -Daniel

  • 04-02-2013 07:26 AM In reply to

    Re: 1 field choice populates another field

    Hey,

    So I am trying to duplicate what you did on the other side but I keep getting an error that says "@Manager_Name" does not point to a valid location path of a field or group."

    I am assuming that I can change:

     @Manager_Name[@Company_Name = currentCompany]  to @Manager_Name[@Company_Name = receivingCompany]

     How did you create that formula? And why is it causing an error, now I am truely confused! :(

     Also, where is a good place to learn how to create these formulas/expressions?

    Thanks

    -Daniel

  • 04-03-2013 03:14 PM In reply to

    Re: 1 field choice populates another field

     Well - are you checking the Edit XPath box prior to trying to change the formula? IP is trying to be gentle with you by not showing the real XPath. :)

    xdXDocument:GetDOM("assetTransfer")/dfs:myFields/dfs:dataFields/dfs:assetTransfer/@Manager_Name[../@Company_Name = xdXDocument:get-DOM()/my:myFields/my:currentCompany]

    So - the above is the formula I'm using on the current company field.

    xdXDocument:GetDOM("assetTransfer")/dfs:myFields/dfs:dataFields/dfs:assetTransfer/@Manager_Name[../@Company_Name = xdXDocument:get-DOM()/my:myFields/my:receivingCompany]

    should be valid. Attaching again w/ the rules for the other section.

    In this case, you can use the IP UI to select the fields - the part in the square brackets above is a filter, and added by IP when you click the Filter Data button after selecting a field in the formula editor.

    Hilary Stoupa

  • 04-04-2013 12:45 PM In reply to

    Re: 1 field choice populates another field

    Hilary,

    Thank you, your help and explanation is greatly appreciated!

    -Daniel

Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.