I just got Nintex Forms and I need to figure out how to use a Web Request Control to get User Profile information. As a test case, I would like to add the control to my form configured as label or text to show the current user's manager. Can anyone demonstrate how that is done?
Thanks and Best Regards,
Sorry about that, I was replying off of my phone so I couldn't shoot you any screenshots...
This is the control you are looking for in your toolbox on nintex forms:
Drag it to where you want it on the form and double click it to configure. Use the formula builder button to access named controls and the inline functions such as userProfileLookup.
In the below image, we are pulling the manager of the person entered into the "RequestedBy" named control. We are then doing a userProfileLookup of that returned value to get the display name for the manager:
with the formula userProfileLookup(userProfileLookup(RequestedBy,"Manager"),"PreferredName")
if you wanted just the manager you would use:
and if you don't want to look for the manager of the person chosen inside a control, you could replace RequestedBy with the Current User under the common tab in the formula builder.
Hope that helps...
We have actually had success with the userProfileLookup function. What I am trying to do is "figure out how to use a Web Request Control to get User Profile information" so that I can apply it to more complex solutions. I am hopeful that if I can make it work for something as simple as pre-populating a users profile data, I will be able to build on that knowledge and do things like automatically provision a new user based on roles that they are assigned from an Access Web App.
Do you have an idea on how to get the Web Request working? Incidentally, once I have gotten a handle on web requests, I will be digging into SQL Request controls. (Just incase you have expertise in that area...)
Thanks and Regards,
Patrick Kelligan ah I got you... sorry about that! Unfortunately I cannot be much more help in this instance but watching with interest to the thread now. Keep me posted with whatever you find please?
I managed to perform what you'd like to do with SharePoint 2013 OnPrem.
Firstly, I created a calculated value named CurrentUserLoginName with the following formula (Current User is the reference that you can found in Common tab and replace is the reference that you can found in Runtime Functions tab):
Here's how I configured the Web Request control on Nintex Forms:
Tell me if you have any problems with this solution.
Hope it works on your environment
Great Response. Here is what a straight "Current User" renders for me (no quotes):
Does this impact what I should use in the replace function? What should the string look like when the replace is complete?
it should look like this for the following login name :
i:05:t|adfs with email@example.com
You should replace @ by %40 and I think that's all.
I didn't managed to replace | by %7C but it worked for me if this character is in the url.
You can type the url in the browser (Chrome) and you should get a response or an error if something is wrong.
Hope it works