cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
omi18
Post Partisan
Post Partisan

Run Time Error for triggering the Flow

Hello,

 

I have a flow that triggers with the click of a button. Which runs the store procedure. In the given screen below I have three different departments with fields. The user may or may not fill in all the details requested. Fields are optional. And I have the same rule (optional fields) set up on the SQL side as well. 

 

When I try to test this flow with random fields completed it works 1-2 times and then starts to throw an error: Invalid parameter. 

 

omi18_0-1624539508415.png

 

Any suggestions? 

 

Thanks,

Omi

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

In my experience Power Automate doesn't pass null values in JSON and that is what is used between Power Apps and Flow.  It may still work depending on the order of your optional parameters.  But as I said, I just don't use them because they cause issues.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

When calling a flow from Power apps, Power Automate doesn't support optional parameters.  So you have to supply all the parameters.  There are two ways to do this.

1) load the optional parameters with a default value like "null" and then process them in the flow.

2) Pass all the parameters as a single JSON object.  Then parse the object once you are in flow.  Since there is only one parameter, the JSON object, you don't have to worry about optional values.  You can leave them blank in the JSON.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 ,

 

Yes, I meant optional as in we are passing null value whichever fields are not filled.  It just happens with this flow. But other flows similar to this are working fine. 

 

Thanks,

Omi

Pstork1
Dual Super User
Dual Super User

In my experience Power Automate doesn't pass null values in JSON and that is what is used between Power Apps and Flow.  It may still work depending on the order of your optional parameters.  But as I said, I just don't use them because they cause issues.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,850)