Hello Community! I need assistance with the following. Trying to patch to person fields to a SP List. The app seems to be working fine and NOT returning any errors. However, only writes one of the fields "Agent". I have to separate person fields created: Agent and Requester. The Agent is been auto populated while the Requester is from a combo box using Office 365Users.SearchUser connector. Here is the code. Suggestion please.
// To create record
Patch(Tickets,
Defaults(Tickets),
{
Agent:'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & AssignTo.Staff.Email,
Department: "",
DisplayName: AssignTo.Staff.DisplayName,
Email: AssignTo.Staff.Email,
JobTitle: "",
Picture: "",
Requester: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & cmbRequester_2.Selected.Mail,
Department: "",
DisplayName: cmbRequester_2.Selected.DisplayName,
Email: cmbRequester_2.Selected.Mail,
JobTitle: "",
Picture: ""
}
}
};
Solved! Go to Solution.
Hi @ParadigmaNet ,
You are missing a couple of brackets {}
Patch(
Tickets,
Defaults(Tickets),
{
Agent:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & AssignTo.Staff.Email,
Department: "",
DisplayName: AssignTo.Staff.DisplayName,
Email: AssignTo.Staff.Email,
JobTitle: "",
Picture: ""
},
Requester:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & cmbRequester_2.Selected.Mail,
Department: "",
DisplayName: cmbRequester_2.Selected.DisplayName,
Email: cmbRequester_2.Selected.Mail,
JobTitle: "",
Picture: ""
}
}
};
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi WarrenBelz! Surely enough missing {}. Could not figure out by myself. Beginner's mistake.
Thank you for your help!
Hi @ParadigmaNet ,
You are missing a couple of brackets {}
Patch(
Tickets,
Defaults(Tickets),
{
Agent:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & AssignTo.Staff.Email,
Department: "",
DisplayName: AssignTo.Staff.DisplayName,
Email: AssignTo.Staff.Email,
JobTitle: "",
Picture: ""
},
Requester:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & cmbRequester_2.Selected.Mail,
Department: "",
DisplayName: cmbRequester_2.Selected.DisplayName,
Email: cmbRequester_2.Selected.Mail,
JobTitle: "",
Picture: ""
}
}
};
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi WarrenBelz! Surely enough missing {}. Could not figure out by myself. Beginner's mistake.
Thank you for your help!
User | Count |
---|---|
119 | |
86 | |
83 | |
74 | |
69 |
User | Count |
---|---|
215 | |
179 | |
140 | |
109 | |
83 |