Hi,
Can someone help me with a simple power app form in which I want to enable a user to enter data and then store it on a sharepoint list. The goal of the form is to expose it in a Power BI report so that the user can enter data via the report.
In the form I use the patch function on the 'save' button but on runtime it gives the following error:
The requested operation is invalid. Server Response: Object must implement IConvertible. clientRequestId: 75e0c67d-304d-47b1-9cfc-20cab64a8179 serviceRequestId: 75e0c67d-304d-47b1-9cfc-20cab64a8179
The function is as follows and shows no errors on itself:
Patch('Sprint Happiness', Defaults('Sprint Happiness'),
{Title:Dropdown1,
sprintNumber:TextInput2,
teamHappiness:TextInput2_1,
productOwnerHappiness:TextInput2_2,
Comment:TextInput1.Text
})
With the help of google I had no luck and also tried creating multiple apps to get rid of this error.
I also tried entering .Text after all of the inputs and dropwdown but the the function would not work on its own.
Kr,
Arnoud
Solved! Go to Solution.
Hi Arnoud
Appreciate you've probably resolved this now, but just in case . . .
I've been seeing the exact same error today. I had loads of text values being patched from a mixture of label and text input fields. Those coming from the labels were formatted like this:
Manager:Manager.Text
Whereas for some reason I didn't bother adding '.Text' to the values coming from my text input fields, so they looked like this:
'General Comments':'General Comments'
I fixed it by ensuring all the text controls had the .Text value type specified. So 'General Comments':'General Comments' became 'General Comments':'General Comments'.Text. And then all was well.
You mentioned you'd tried adding .Text to each of your inputs and the dropdown, but did you try specifying the dropdown as Title:Dropdown1.Selected.Value? (Or, if the dropdown choices come from a lookup, Title:Dropdown1.Selected.Result)
Hope that helps
Hi Arnoud
Appreciate you've probably resolved this now, but just in case . . .
I've been seeing the exact same error today. I had loads of text values being patched from a mixture of label and text input fields. Those coming from the labels were formatted like this:
Manager:Manager.Text
Whereas for some reason I didn't bother adding '.Text' to the values coming from my text input fields, so they looked like this:
'General Comments':'General Comments'
I fixed it by ensuring all the text controls had the .Text value type specified. So 'General Comments':'General Comments' became 'General Comments':'General Comments'.Text. And then all was well.
You mentioned you'd tried adding .Text to each of your inputs and the dropdown, but did you try specifying the dropdown as Title:Dropdown1.Selected.Value? (Or, if the dropdown choices come from a lookup, Title:Dropdown1.Selected.Result)
Hope that helps
Thank you for your comment!
You are correct, I have resolved the issue already but with the solution you proposed. I did not use Selected.Value for the dropdown and when I did it worked 🙂
Kr,
Arnoud
But how does this apply to Fields expected to contain a Number, E.g Quantity?
Code Example
Patch('Stocklevels', Defaults('Stocklevels'), {Title: DataCardValue1.Text, Description: DataCardValue2.Text, Quantity: DataCardValue3.Text })