Forum Discussion

DeveloperCYT's avatar
DeveloperCYT
Copper Contributor
Jul 02, 2019

PowerApp from showing CurrentUser

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?

Screenshots...

1 Reply

  • Damien_Rosario's avatar
    Damien_Rosario
    Silver Contributor

    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 

Resources