cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

The schema definition for action with status code '200' is not valid. The schema definitions for actions with same status code must match.

I am creating a powerapp flow
user inputs values var 1-3 - worked great
all values go thru a sql script - worked great
the table returned from the query is different for each 1 or 2 or 3 - worked great
created a conditions if 1 - worked great
If var = 1 - works great
if var != 1 - works great
added condition in var != 1 to see if it is 2 or 3
if var =2 and if var != 2 inside var != 1 condition - worked great
Then I added the response to each condition
response for var = 1 works fine adding the other reposes I get the 200 status code but I need the response just the way it is, don't I. What do I change the status code to.

ThanksiA8Si8a

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: The schema definition for action with status code '200' is not valid. The schema definitions for actions with same status code must match.

hi @CrashWave  its weird, it looks like your schema validation has the error.

Just to test do you create again new actions? the schema from both request are the same? Could you send your schema here please.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Advocate I
Advocate I

Re: The schema definition for action with status code '200' is not valid. The schema definitions for actions with same status code must match.

Hello @ChristianAbata 
The schema are indeed different and they should be. Each option returns different columns from the same tables. so the schema in each response is different and that is how it should be. 
There has to be a way to allow for multiple responses with different schema under different conditions.
Besides creating a flow for EACH input the user selects and adding if statements to the powerapps button to select which flow to use based on user input is there any way around this.

 

Thanks

Highlighted
Super User III
Super User III

Re: The schema definition for action with status code '200' is not valid. The schema definitions for actions with same status code must match.

mmm @CrashWave  what you can do is add in your API a status response that means for you something for example 201 : message OK_2

So then you can manage both schemas. Let me test please



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Advocate I
Advocate I

Re: The schema definition for action with status code '200' is not valid. The schema definitions for actions with same status code must match.

Thank you @ChristianAbata 
I don't think there is a way around this. Strange this is not allowed since technically the output will only have one status code because of the conditions. Bug? idk
So the solution for now is to yes create a separate flow for each option selected. three identical flows except for the response schema 🙄

Highlighted
Super User III
Super User III

Re: The schema definition for action with status code '200' is not valid. The schema definitions for actions with same status code must match.

@CrashWave  Strange you right maeby is a kind of bug. 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,665)