cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
foff
Regular Visitor

Filter Array Issue or Platform Issue?

I will share some screenshots and you tell me where the issue is and how i find the answer to this....

 

Filter array error

 

foff_1-1691068676554.png

 

please note......

 

foff_2-1691068718229.png    

foff_3-1691068744576.png

 

wonder if anyone from MS can comment on this....

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you for that - i do appreciate the time you took to have a look and share your best practices.

 

The fact that you have just had something similar, to me, indicates somethings going on in the back end. Try doing a Parse JSON action and then using the values from the parse json in your flow... good luck 🙂 I have a case open with MS on that very topic. But I suggest you try it.

 

I pretty much do what you do also. I know about the renaming issues - so i always rename early and if i have to do a rename, i know to go back down the flow and refresh all the steps that reference the renamed step. I also exit out of PA completely and then go back into it as a kind of "refresh"

 

As for testing, I use it a lot, but I also understand why and how I can use the automatic testing. It obviously depends on what the flow does. This current flow sets permissions in Sharepoint and yes, I cannot auto test because once it has run on the sharepoint folder, if i where to run it again, the folder has already been modified so the test will fail. But for other types of flows, I use testing a lot.

 

I also have issues with copying steps and barely use it. Sometimes it works, sometimes it doesn't do anything. Obviously renaming issues when doing that and also the internal dynamic components have to be changed because they still reference the original parent structure from where it was copied.

 

I also discovered the main culprit behind the main issue of this post.

 

The switch statement.

 

So the value being evaluated is a string (from dataverse) although it only contains whole numbers.  PA must be doing a conversion/detection an decided that the 327 that i put in the case doesn't match. Then using single quotes appeared to fix filter array issue but failed to evaluate correctly. Using double quotes in the case statement seems to wok as expected but this is what PA shows me.

 

Oh the joys.

 

foff_0-1691081665830.png

 

View solution in original post

12 REPLIES 12

Show screenshots of the steps before you run the flow. It's difficult to tell by just looking at the error.

i think you missed the point.... 🙂

 

The name of the action that failed is "Filter array 3" and the error report generated on the right states "Remove_LZ_Sales_from_the_array".

 

something is broken.... and it is not my flow. the filter array action is repeated in every switch statement...

 

Here is the flow in a bit more detail

 

foff_0-1691069542813.png

 

Thank you, that is helpful. I do get the point, and it is a strange error, so I wanted to see if you had anything else going on with the flow that might provide some evidence of the issue.

 

Did you copy and paste the action from clipboard? 

 

Was there ever a step in the flow named "Remove_LZ_Sales_from_the_array"?

 

Is this flow co-owned or being edited by multiple users?  

 

I think the problem is with the Switch 3 and not the Filter Array step. If the Switch was copy and pasted it probably has some system code or something that carried over with it. Unfortunately you can't Peek Code on the Switch.

 

I would try replacing the Switch. And don't use the clipboard.

Thanks for the reply. I might have initially copied that action, but then deleted and recreated it as part of trying to resolve the error. There are other steps with very similar names which i constantly have to rename. I also "peeked" at the code but nothing special there.

 

I wouldn't have copied the switch itself. And I cannot copy a branch of the switch statement so it can't be that. (if that made sense)

 

 

update

 

Here is where it gets interesting...

 

foff_0-1691075518487.png

Looking at the switch case (case-327) which should not fire as the switch value is 302 - even if it wasn't a match it should still not trigger - but that is the "filter array" that is triggering an error. But it shouldn't even be touched! How now? Weird.

same again...

 

foff_1-1691075901313.png

but when you expand the action that shouldn't even be run you get..

foff_2-1691075968665.png

and i deleted the previous "filter array" action and recreated it.

With all of those problems I would completely delete the flow and start over.

 

I never use copy clipboard because it always ends up causing me a problem. And it is either with the copy action or the renaming action, PA always wants to give trouble.

 

I literally had a similar example to you happen a few minutes ago. I was editing a flow and testing. I pressed test flow and noticed the flow ran showing the old actions I had just deleted (some testing Compose steps and other stuff). 

Since the flow has to save before testing, there is no way I ran the flow without saving after I deleted those steps. So I backed out of the flow completely and refreshed the browser. Came back into the editor and the flow was how it was supposed to be with those steps removed.

 

I'm thinking that there are some names and/or references that power automate uses to build a flow in the background, and when things are changed too rapidly or moved around, it might not refresh those names properly.

 

Also I think these issues happen when using the "Test" automatically with a recently used trigger. It is like the current Test flow is recalling the past data, and some ghosts from that past data steps get fed into the new flow.

 

Long story Long, I don't have the correct solution for you other than share things I do to help prevent some weird issues

  • Don't copy and paste steps
  • Don't rename things that have following steps connected to it. (Primarily Data type actions like Compose or Filter Array since they seem to be the main culprit) 
  • Don't use the Test button too rapidly
  • Try not to test automatically with recent trigger on the same item a dozen times, just create a new item or whatever to let the flow trigger normally. I think it kind of refreshes data references like that.
  • Save and back out of the flow editor completely and refresh the browser the moment you start getting weird Rename problems.
  • Completely deleting flows and remaking new ones is sometimes the best way, consider it extra practice.
    • I had a very large complicated flow (at least 100 steps and at a dozen http requests) I had to completely remake due to me adding scopes and renaming items. It just wouldn't sort out and work correctly after I made a lot of changes. Ever since then I've always been cautious about how I name or change steps. That flow ended up having 300 step type actions and I did not want it to break.

 

Here is a recent example of the renaming issue that I have had frequently

https://powerusers.microsoft.com/t5/Building-Flows/Flow-Editor-Stuck-on-Renaming-Action/m-p/2266853#... 

 

Hope this helps, sorry you're having an issue, maybe someone has a legitimate answer

Thank you for that - i do appreciate the time you took to have a look and share your best practices.

 

The fact that you have just had something similar, to me, indicates somethings going on in the back end. Try doing a Parse JSON action and then using the values from the parse json in your flow... good luck 🙂 I have a case open with MS on that very topic. But I suggest you try it.

 

I pretty much do what you do also. I know about the renaming issues - so i always rename early and if i have to do a rename, i know to go back down the flow and refresh all the steps that reference the renamed step. I also exit out of PA completely and then go back into it as a kind of "refresh"

 

As for testing, I use it a lot, but I also understand why and how I can use the automatic testing. It obviously depends on what the flow does. This current flow sets permissions in Sharepoint and yes, I cannot auto test because once it has run on the sharepoint folder, if i where to run it again, the folder has already been modified so the test will fail. But for other types of flows, I use testing a lot.

 

I also have issues with copying steps and barely use it. Sometimes it works, sometimes it doesn't do anything. Obviously renaming issues when doing that and also the internal dynamic components have to be changed because they still reference the original parent structure from where it was copied.

 

I also discovered the main culprit behind the main issue of this post.

 

The switch statement.

 

So the value being evaluated is a string (from dataverse) although it only contains whole numbers.  PA must be doing a conversion/detection an decided that the 327 that i put in the case doesn't match. Then using single quotes appeared to fix filter array issue but failed to evaluate correctly. Using double quotes in the case statement seems to wok as expected but this is what PA shows me.

 

Oh the joys.

 

foff_0-1691081665830.png

 

apologies - here is a slightly better screenshot showing the same error as above 🙂

 

foff_1-1691081889956.png

 

foff
Regular Visitor

Final thoughts

 

This entire thread was triggered because the error message was wrong! In fact more than that, i think the entire switch operation is faulty.

 

Here's why:

The switch operation couldn't evaluate the values passed and compare it to the case provided. Fair enough, but the whole purpose of the switch operation is that if the value doesn't equate to the case statement, then the "default" branch is followed. Regardless of the "type" of value - it either is a match or it isn't a match. SIMPLE. If it isn't a match for any case because of the actual value or type mismatch, then the "Default" path is followed. Else, the case which matches is followed.

 

It really is that simple.

 

In this case, PA couldn't evaluate the case statement and then simple tried to follow all paths and generated rubbish error messages from the next line. How stupid is that.

 

Anyway, have fun.

Hello @foff,

 

the whole switch is a bug by design. I raised a ticket one year ago and got an answer that the team will fix it in the next 6 months. Nothing happened. I try to avoid it whenever it is possible. But if you use it you already found out that you need the same types (like anywhere else). "If" also doesn't work if you provide strings and integers to be compared but you will receive a better error message.

 

Since Power Automate tries to convert things like numbers and booleans and the case step of the switch isn't able to understand an expression, things get more complicated. Microsoft designed a workaround that you can put things under double quotes (") to tell Power Automate that it is a string. This gets funny if those double quotes are part of the value you want to compare to.

 

But in your case you can write the numbers like this inside the case action:

 

"302"

 

and it will work but lead to wrong flow histories.

 

I saw you already realised all of that but I wanted you to know that you are not alone with all the headaches Power Automate is causing. Maybe you can share the outcome of your ticket.

foff
Regular Visitor

Thanks @Matthy79 - I appreciate your comments. It's true there are these "bugs" (see what i 'did' there 😉 ) and we learn to live with them. They are infuriating and cause unnecessary frustration and delays. I mean i do enjoy power automate, but at the same time, there are so many things that are buggy. Thanks for your post and i will try and keep you updated on my other ticket....

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,498)