I have a custom form on PowerApps, and I need to sabe the current user in this field:
When he saves the item and set current user there.
I tried this code:
{
DisplayName:User().FullName;
Claims:"i:0#.f|membership|" & Lower(User().Email);
Department:"";
Email:User().Email;
JobTitle:"";
Picture:""
}
but didnt work
Solved! Go to Solution.
Hi @Gorilla_8 ,
I believe you are implementing in canvas app and when you add a personalized card you need to set it to a respective column in SPList I want to know that list column.
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 @Gorilla_8 ,
try this:
{'@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 @Gorilla_8 ,
Try this, if I get you right you are trying to set the logged user name in the text field but want to save the details in a people picker control? if so:
Text property of the Inputtext field:
User().FullName
and at the button onSelect time user as below:
Patch(SPListName,Default(SPListName),{Title:"Title",associate:{'@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 @KrishnaV !
Yes, I wanna exactly this!
and I tried this code and show me: "patch function has invalid arguments"
Hi @Gorilla_8 ,
Please replace the associate with the relevant column name of your list. Please share me the list schema I will change the formula and let you know.
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 @Gorilla_8 ,
Patch needs the datasource as the parameter we can't pass the form as a parameter. change the list as below:
Patch(SPListName,Default(SPListName),{Title:"Title",PeoplePickerfieldName:
{'@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.
I tried this, and show "The function patch has invalid arguments"
Hi @Gorilla_8 ,
Could you share me the screenshot of the list setting I want to see the list column names, so that I will change the formula accordingly.
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.
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |