Reputation: 549
I have a 'Sign Up' button in my app that adds the logged in user into a sharepoint list. The code (which works perfectly) is currently -
Patch(
EVENTPARTICIPANTS;
Defaults(EVENTPARTICIPANTS);
{
EVENTID: Gallery3.Selected.EVENTID;
NAME:{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser";
Department: "";
Claims: "i:0#.f|membership|" & User().Email;
DisplayName: User().FullName;
Email: User().Email;
JobTitle: "";
Picture: User().Image
}
}
)
I'm trying to figure out how to add an updateContext after it, so my confirmation popup box will be visible, but I can't get the syntax right.
Can someone please tell me why this doesn't work? Thanks!
Patch(
EVENTPARTICIPANTS;
Defaults(EVENTPARTICIPANTS);
{
EVENTID: Gallery3.Selected.EVENTID;
NAME:{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser";
Department: "";
Claims: "i:0#.f|membership|" & User().Email;
DisplayName: User().FullName;
Email: User().Email;
JobTitle: "";
Picture: User().Image
}
}
)
;
UpdateContext({varShowPopup:true})
Upvotes: 0
Views: 929
Reputation: 2218
Use this formula:
Patch(
EVENTPARTICIPANTS;
Defaults(EVENTPARTICIPANTS);
{
EVENTID: Gallery3.Selected.EVENTID;
NAME:{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser";
Department: "";
Claims: "i:0#.f|membership|" & User().Email;
DisplayName: User().FullName;
Email: User().Email;
JobTitle: "";
Picture: User().Image
}
}
);;
UpdateContext({varShowPopup:true})
It should work for you!
Upvotes: 1
Reputation: 87228
In the locale that you are editing your app, the list separator is ;
- which probably indicates that you are in a place that uses ,
as the decimal separator (instead of .
). That changes the chaining operator from ;
to ;;
, which is what you found out you need to use to make your scenario work. You can find more details at https://learn.microsoft.com/power-apps/maker/canvas-apps/global-apps#formula-separators-and-chaining-operator
Upvotes: 2