cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
u4jaanus
Resolver I
Resolver I

Conditional Schema in Flow

Hi,

Have a flow which receives a response on SOAP calls depending on how many products details were requested. If requested for multiple products; it replies with an array containing multiple objects related to each requested product , if requested for One product then it receives an object.

Now pushing this data back to Power App is where I am getting error. I am using Parse JSON with Schema to accept array then using select operator to collect what i need and responding to Power App. This approach works well when there are multiple products response however when I test this with only one product I get schema mismatch error that it was expecting array received an object.

 

I am thinking if I could use a Condition to evaluate if response if an array use one schema and if response is an object use other schema. I have tried to use Apply to Each with Parse JSON however Apply to Each also require Array and wont work on Object.

 

Please advise.

u4jaanus_0-1606727589747.png

Error shown

u4jaanus_1-1606727631875.png

 

 

 

 

0 REPLIES 0

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,389)