InfoPath 2007 Get UserName from Preferred Name - InfoPath Dev
in

InfoPath Dev

InfoPath 2007 Get UserName from Preferred Name

Last post 01-23-2017 06:12 AM by Wheels. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-20-2017 11:44 AM

    InfoPath 2007 Get UserName from Preferred Name

     Good afternoon.

     I have been wrestling with this issue for a few hours, and I thought I would reach out to the experts in the InfoPath community. 

    I am basically trying to get the Manager's name given an employee's Preferred Name. I am current using the GetCommonManager and GetUserProfileByName webservices where I pass the username (e.g. 1x234) to the GetUserProfileByName webservice, query, set a field with the Manager Value (not name), pass the Manager Value as the accountName parameter for the GetCommonManager webservice, and set a field for the Name (Preferred) returned. This works well if I provide the user name, but I want to pull this manager information for users in a drop-down list and not the user of the form (which would be  a simple matter of using username()). I found the following example, but I believe it relies on the user of the form's information:

     https://claytoncobb.com/2009/06/21/userprofileservice-extended/ 

     Have a great weekend. 

  • 01-20-2017 12:12 PM In reply to

    Re: InfoPath 2007 Get UserName from Preferred Name

    Captain's log supplemental: I am pulling the list of names from a SharePoint Custom list using Active Directory, and I have Employee Name and Manager Name in the two columns of the custom list. I could not figure out a way to pass the Employee Name parameter or ID to query the Manager Name list.

  • 01-21-2017 05:36 AM In reply to

    Re: InfoPath 2007 Get UserName from Preferred Name

     Ok - so you have a list w/ Employee Name and Manager Name & you have a data connection to that list? Drag the entire thing onto your form, so you have the query & the data fields. Add a button that queries the data source. Now you can preview the form and see the data. Click the button to return the values - what's in the list? If you copy out an employee name from the data, and put it in the employee name query field, and click the button that queries the list, do you now only have back data for that employee? Just trying to help you troubleshoot. :)

    Hilary Stoupa

  • 01-23-2017 05:27 AM In reply to

    Re: InfoPath 2007 Get UserName from Preferred Name

    Good morning Hilary.

    I only have dataFields (no queryFileds) in my DataSource.The list is just an ID (1,2,3), and Employee Name, and a Manager Name for each. 

     Have a great day. 

  • 01-23-2017 06:12 AM In reply to

    Re: InfoPath 2007 Get UserName from Preferred Name

    Hi Hilary. I was able to figure out what I needed to accomplish based on your post and the one here: http://www.infopathdev.com/forums/p/21176/73284.aspx. Thanks again.

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