Showing results for 
Search instead for 
Did you mean: 
Not applicable

powerapp flow on select function not working

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?




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.



Advocate I
Advocate I

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.

Not applicable

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"Flow.png?


Not applicable

So my flow looks exactly like yours. The only issue is that I’m not seeing resultset.table1 as an option in the body section. Am I missing a step?

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:


This is the one that got me started.

Not applicable

@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.

Helpful resources

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users


We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (29,467)