How to get logged in user display name in InfoPath form when InfoPath form is published to SharePoint online(Cloud)?
Tried following:
1. In the InfoPath form, I tried using userName() function in the value of the text box by clicking on fx.
When I login Sharepoint Online and open InfoPath form,
displays like this: i:0#.f|membership|reddyn1@neovialogistics.net in the text box.
For your Information:
When I go to Office 365 Admin page, there I find "users and groups" link, when clicked on the link, it shows "DISPLAY NAME" and "USER NAME" columns.
It shows mine "Narayana Reddy" under "DISPLAY NAME" column andreddyn1@neovialogistcs.net" under "User Name" column.
2. I tried to use "GetUserProfileByUserName" web service.
a. For Person Group Picker control, I placed "userName()" function value for "AccountId" field for this
control.
b. I gave above "AccountId" as input parameter value to GetUserProfileByUserName" web service.
c. In the button actions I am calling "GetUserProfileByUserName" web service.
d. When I login SharePoint Online, open InfoPath form and clikc on button,
it throws me an error: "An error occured querying a data source"
Seeking Help:
I may be missing something. Appreciate any one's help regarding this.
Thanks in advance!
Narayana Reddy G