Ok, here's my issue. I'm using flow to call a sql stored procedure to update a sql table via powerapps. I created the flow and i was hoping the funciton to call the flow in powerapps would be easy. well, i guess not. Here's the function i'm using on the onselect property of the submit icon. Can someone corrrect me if i'm wrong here?
PowerAppsbutton.Run(Value(DataCardValue5.Text),DateValue1.SelectedDate,DateValue2.SelectedDate,DataCardValue11.Text,DataCardValue6.Text,Dropdown1.Selected,DataCardValue6.Text)
See screen shot of the flow below.
Here's the error i'm getting in powerapps by the way: Invalid argument type (Record). Expecting a Text value instead.
I had a similar issue when I switched from a SQL view to Flow/StoredProcedure. It had to do with the date fields when I received a similar error (red "X" on my Flow Run call).
PowerApps & SQL don't speak "date" field types. The date is returned formatted as a string "yyyymmddThhmmss". PowerApps likes "datetime" or "smalldatetime" better. What is the field datatype in your SQL table for any date/time values?
Try formatting the date field in the JSON:
"InitialContact": { "type": "boolean" }, "DateInterview1": { "type": "string", "format": "date-time" },
This may or may not work depending on your sql field type.
You may need to work with the date value as a string and convert to date before using it in your PowerApps app. The "DateTimeValue()" may help.
they are all date time fields with with this format "2019-02-12 09:58:18.130".
Apart from the datetime conversion, am i doing the powerapps on select icon function correctly?
I've attached a screen shot from my Flow. Is the "Body"?
Is your stored procedure returning a recordset (table) or variable or ??
What is being returned if you use the available resultset?
If you are not already collecting the response, try:
ClearCollect(collectStoredProcResults, storedprocFlowName.Run(<parameter1>,<paramter2>)
Then, output the collection to a gallery.
Now that I look at it, your JSON may be missing the array object. Brian Dang has a blog post that will give you the best way to create the response JSON:
https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/
This is the one that got me started.
@Anonymous any help here?
Have you had a chance to review the link posted in the previous reply? There is a section there that will tell you exactly how to craft the Response step. This is what you are missing.
Take a look and if you still cannot find it, I'm happy to write it out. Brian does a great job, so you shouldn't have any problem.
User | Count |
---|---|
196 | |
125 | |
88 | |
49 | |
42 |
User | Count |
---|---|
285 | |
162 | |
138 | |
76 | |
73 |