Hey Guys,
What I have done is created a lookup into active directory in my Infopath form that uses a person's username to query information(via web service). So, for example, if my username was User1 and another person(user2) were filling out the form. When it came to the username button they would enter user1 and hit refresh and all of the information pertaining to my username would be automatically filled out in the fields. This has been working excellently so except for one problem. There isn't really a database where we can look up a person's Username pertaining to their first name or last name, etc. So, I did some customization of the people search scope results and made it so that the information that is needed is returned and put all of it on a custom aspx page in sharepoint(using sharepoint designer so it is not linked to a master page or anything). Now, I have added a hyperlink inside of my form that opens up that particular web page so that the user filling out the form is able to search any other user. Now, my question is that is it possible to have a value, which would be a search result, returned, on the click of a button, and automatically filled in a certain field of an infopath form?
So
User 2 Searches John Smith
John Smith search results come up as username: John.Smith
after clicking a button, John.Smith is automatically filled into a field in my infopath form.
I hope I am clear. Thanks for all of your help!