In a Infopath form I was building I wanted to get the Manager name of the person who opens the form but also the Email address of that manager, for later use in a Nintex Workflow. In the comments of Itak Shakury’s post I found the necessary info.
First I retrieve the User information I need in the form according to Itaks tutorial. Then I do the following:
- First, I create a new data field for Manager, and I set the default value to the Manager element coming from GetUserProfileByName –>Value[Name = "Manager"]
- That data comes in as <domain>\<account name>, so I changed the formula to –> substring-after(Value[Name = "Manager"]; “\”) to strip the <domain>\ portion off so that I only have the account name remaining, which is what the GetCommonManager query requires.
- I then added a rule set on the Manager field with 2 actions
- Set a field’s value: Accountname = .
- Query using a data connection: GetCommonManager
- After getting the manager from the GetProfileByName, the form sends that same piece of data to the GetCommonManager, and it returns a data set of relevant info just like the previous method. The data is retrieved the same way - there should be no filtering. The form can then populate a Manager section similar to how the User section populated but this time using the GetCommonManager data connection.
Tags: webservice


Leave a Reply