Good morning,
I've scoured the boards for solutions and can't seem to find anything for my specific situation. This is a canvas app form feeding a SharePoint site.
I have one choice column that has the choices built into the form that is showing an error in the patch. Without it everything works fine, but when I add in the section for the choice column I get red squiggles.
This is the section for the choice column that isn't working:
/*****Choice Column******/
OnsiteorDeskAudit: Dropdown_Location.Selected, {'@odata.type':""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
ID:'1',
Value:"Onsite"},
The italicized parts are the ones showing the error:
Everything after the comma has the red underlining also, but I think it's related to this portion not working.
This is the full patch for reference:
Patch( 'SPListName',Defaults('SPListName'),
{
/******Single line of text columns******/
RecipientName: Recipient.Text,
GAT: GAT.Text,
AuthorizationID: Authorization.Text,
Reviewer: Reviewer.Text,
/*****Master List Columns******/
State: Dropdown_State.Selected,
Office: Dropdown_Office.Selected,
BusinessArea: Dropdown_BusinessArea.Selected,
/*****Date Column*****/
DateScheduled: DateScheduled.SelectedDate,
/*****Location Column******/
OnsiteorDeskAudit: Dropdown_Location.Selected, {'@odata.type':""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
ID:'1',
Value:"Onsite"},
};
Navigate(Completion, Fade))
Any assistance is appreciated.
@BCBuizer solution worked, with a slight modification -
Patch(
'SPList',
Defaults('SPList'),
{
/******Single line of text columns******/
RecipientName: Recipient.Text,
GAT: GAT.Text,
Authorization: Authorization.Text,
Reviewer: Reviewer.Text,
/*****Master List Columns******/
State: Dropdown_State.Selected.Result,
Office: Dropdown_Office.Selected.Result,
BusinessArea: Dropdown_BusinessArea.Selected.Result,
/*****Date Column*****/
DateScheduled: DateScheduled.SelectedDate,
/*****Choice Column******/
OnsiteorDeskAudit: Dropdown_Location.Selected
}
);
Navigate(Completion, Fade)
Solved! Go to Solution.
Hi @C_Salm ,
I found some syntax mistakes in your code:
- No closing bracket for the Patch function
- comma after the last argument in the Patch function.
Perhaps those are causing you to believe there is an issue with trying to patch the choice column.
Try the below please:
Patch(
'SPListName',
Defaults('SPListName'),
{
/******Single line of text columns******/
RecipientName: Recipient.Text,
GAT: GAT.Text,
AuthorizationID: Authorization.Text,
Reviewer: Reviewer.Text,
/*****Master List Columns******/
State: Dropdown_State.Selected,
Office: Dropdown_Office.Selected,
BusinessArea: Dropdown_BusinessArea.Selected,
/*****Date Column*****/
DateScheduled: DateScheduled.SelectedDate,
/*****Location Column******/
OnsiteorDeskAudit: Dropdown_Location.Selected
}
);
Navigate(Completion, Fade)
Hi @C_Salm ,
Try removing below part (which is causing error) from your formula -
{'@odata.type':""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
ID:'1',
Value:"Onsite"},
Hi @C_Salm ,
I found some syntax mistakes in your code:
- No closing bracket for the Patch function
- comma after the last argument in the Patch function.
Perhaps those are causing you to believe there is an issue with trying to patch the choice column.
Try the below please:
Patch(
'SPListName',
Defaults('SPListName'),
{
/******Single line of text columns******/
RecipientName: Recipient.Text,
GAT: GAT.Text,
AuthorizationID: Authorization.Text,
Reviewer: Reviewer.Text,
/*****Master List Columns******/
State: Dropdown_State.Selected,
Office: Dropdown_Office.Selected,
BusinessArea: Dropdown_BusinessArea.Selected,
/*****Date Column*****/
DateScheduled: DateScheduled.SelectedDate,
/*****Location Column******/
OnsiteorDeskAudit: Dropdown_Location.Selected
}
);
Navigate(Completion, Fade)
That's what I had started with, and that I've used before in other forms with no problems, and everything gets red squiggles with the error: The type of this argument 'Title' does not match the expected type 'Text'. Found type 'Record'.
Hi @C_Salm ,
I see you marked my reply as the solution, yet in your response you state there is still an issue. Has this now been resolved?
Edit: I see you updated the opening post, thanks
User | Count |
---|---|
257 | |
107 | |
90 | |
51 | |
44 |