cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User II
Super User II

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

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

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
Advocate I
Advocate I

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 🙄

@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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,370)