Hi Team,
I am a new bea in Power Apps, All I need is I want to set the logged in user as the default user.
Solved! Go to Solution.
Hi @The_api_guy ,
If I get you right, try this:
If(FormMode.New = 1,{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:Concatenate("i:0#.f|membership|",User().Email),
DisplayName:User().FullName,
Email:User().Email
})
OR
If(FormMode.New =1,Microsoft365Users.MyProfile()) // This require Microsoft365Users connector
OR
// Set this on APP OnStart and then use the variable on DefaultSelectedItems propoerty of the field in the form
Set(requesterClaim,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & User().Email,
Department:"",
DisplayName:User().FullName,
Email:User().Email,
JobTitle:"",
Picture:""
});
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Hi @The_api_guy ,
If I get you right, try this:
If(FormMode.New = 1,{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:Concatenate("i:0#.f|membership|",User().Email),
DisplayName:User().FullName,
Email:User().Email
})
OR
If(FormMode.New =1,Microsoft365Users.MyProfile()) // This require Microsoft365Users connector
OR
// Set this on APP OnStart and then use the variable on DefaultSelectedItems propoerty of the field in the form
Set(requesterClaim,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & User().Email,
Department:"",
DisplayName:User().FullName,
Email:User().Email,
JobTitle:"",
Picture:""
});
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.