Good day,
I have a online SharePoint List called Interactions (screenshot) attached. After various failed attempts to set a default value to a dropdown (Choice) list, I tried to create my own Patch function. (I receive a global variable from the previous screen called 'varCompanyName' and I can set a text_control to that field so I know the value is passed correctly.) I started trying to save just 1 column to my SharePoint List called Interactions - '_prospect' but in my formula field of the onSelect of my button control complains that it can't find the column = '_prospect'. I've tried appending it with OData__ as in "OData__prospect" (1 and 2 underscores). I don't understand at all how to save 1 record back to my Interactions table. A complete record should write something back like:
Patch(Interactions, Defaults(Interactions), {_date : OData__date__dateCard3.selected, _prospect : OData__prospect_prospectCard3.select, etc etc }) But it complains about the column not being found so I can't even save manual values like {_prospect : "moon child"} let alone grab the values from the controls (next challenge) i.e {_prospect: dropdown.selected} etc.
Solved! Go to Solution.
Hi @HelpWebUJ,
First of all, I would like to confirm a few things:
1. So you have the columns in your sharepoint list named exactly with "_date" and "_prospect"?
2. What are the column types of all these columns? I guess that "_prospect" is a Choice column, if so, then you cannot simply use a "Dropdown.Selected.Value" formula to Patch it to SharePoint list. To Patch a Choice column, you need something like this:
Patch( MyList, MyRecord, {MyChoiceColumn: { Value: Dropdown1.Selected.Value, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"} } )
For how to patch choice and lookup type columns, please refer to:
Regards,
Mona
Hi @HelpWebUJ,
First of all, I would like to confirm a few things:
1. So you have the columns in your sharepoint list named exactly with "_date" and "_prospect"?
2. What are the column types of all these columns? I guess that "_prospect" is a Choice column, if so, then you cannot simply use a "Dropdown.Selected.Value" formula to Patch it to SharePoint list. To Patch a Choice column, you need something like this:
Patch( MyList, MyRecord, {MyChoiceColumn: { Value: Dropdown1.Selected.Value, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"} } )
For how to patch choice and lookup type columns, please refer to:
Regards,
Mona
User | Count |
---|---|
158 | |
91 | |
68 | |
63 | |
63 |
User | Count |
---|---|
210 | |
155 | |
93 | |
81 | |
71 |