PowerApp from showing CurrentUser

Copper Contributor

Hi,

I am confused, i have 2 forms in Powerapps and they seem to be similar in structure.

OnVisible i am setting CurrentUser thus :-

 

UpdateContext({
CurrentUser: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Lower(User().Email),
Department: "",
DisplayName: User().FullName,
Email: User().Email,
JobTitle: ".",
Picture: "."
}
})

 

In the field on the form i am setting default to CurrentUser.

In one form i have it working perfectly, in the other form it still brings up a drop down for a choice from the Person or Group.

 

What have I missed?

nouser.PNGyesuser.PNG

Screenshots...

1 Reply

Hi @DeveloperCYT

 

Unsure what the issue is from what you have displayed. There may something happening that could be causing issues not seen on the screen.

 

You could possibly just add a text box and set it to current user, and then have the Person field reference the textboxname.text to grab the username. Make sure to make the Person field invisible so only the text box is shown.

 

It's a workaround but sometimes it's easier to do that than to figure out the problem itself.

 

Best wishes

Damien