Power Automate: Compare two lists and find what's missing

Sdílet
Vložit
  • čas přidán 27. 08. 2024

Komentáře • 16

  • @wjameswilliams
    @wjameswilliams Před rokem +3

    A nice idea - thanks for sharing, April! I would suggest cutting down on the number of "Apply to each" actions though; I've recently been burned by how slow they can be - and the larger the results from your actions getting the data, the slower they will be!
    Apply to each iterations seem to be particularly affected by the scheduling overhead when running actions, as well as the waiting time between actions that can happen due to backend system load, which can be caused by other MS customers! (As MS states, flows "run on multi-tenant Azure Logic Apps, so other customers' workloads might negatively affect your workflow's performance".) This is particularly bad if your flow only has 2 minutes to complete e.g. if responding to a Power App.
    You could replace the top two "Apply to each" actions with one of each of the "Select" and "Filter" actions, then just loop through the output of that and take your actions with parallelism on.
    The "Select" action would reduce one action's output down to one column, then the "Filter" action would check each item in the other action's output to see if the output of the "Select" action contains (or doesn't contain, depending what you want to do next) an object built using that item e.g. using the expression json(concat('{"Title":"', item()?['Title'], '"}')). That's because the select result is an array of objects - if only there were a function in Power Automate to create an array from a single "column" of values! If you know a cleaner way to achieve this please let me know!

    • @AprilDunnam
      @AprilDunnam  Před rokem +4

      You should make a video on that!

    • @LindseyKyle
      @LindseyKyle Před rokem +2

      You can get Select to return an array of values (instead of an array of objects) by using the "Switch Map to text mode" option and then using an expression like "item()?['yourFieldName']"

    • @wjameswilliams
      @wjameswilliams Před rokem +2

      @@LindseyKyle nice! I had no idea that was an option 🤣 that does make things easier.

  • @AndyNgo_ItAll
    @AndyNgo_ItAll Před 8 měsíci +1

    Great video! My clients are definitely going to like this Flow and the various business scenarios they want to solve. Thanks!

    • @AprilDunnam
      @AprilDunnam  Před 8 měsíci

      Thanks! I hope your clients find it helpful!

  • @kareldecloedt6795
    @kareldecloedt6795 Před 11 měsíci

    Thank you. Just what I needed.

  • @paolovr1970
    @paolovr1970 Před rokem

    Thanks April 🙏❤️🙏 always thank you

    • @AprilDunnam
      @AprilDunnam  Před rokem

      You are so welcome!! Thanks for watching :)

  • @twilliak
    @twilliak Před 5 měsíci

    Thank you, April for this super helpful guide. Two questions: Is there a way to use a user email list instead of the Get Direct Reports list? Is it necessary to use the list of users with tasks for the comparison or can a direct comparison between the users with no tasks and the full user list be used? Again, thanks so much!

  • @garykoivisto3528
    @garykoivisto3528 Před 11 měsíci

    I have a form I'd like to make into a questionnaire that also has an itinerary. I cant figtout how to add the itinerary portion. Is this possible woth forms? TIA!

  • @DataisKing
    @DataisKing Před rokem

    Hey April, Great video. I have a question. I am trying to count the number of times an item appears in a list. I want to show all of the duplicate entries. For Example:
    Item Qty
    Apple 1
    Orange 1
    Apple 2
    Apple 3
    Can this be created in Power Automate and if so, how?

  • @SuperJimmyosullivan
    @SuperJimmyosullivan Před 11 měsíci

    Hi April,
    Thanks for the video, super helpful
    0:06 0:06 0:06 I'm stuck on the condition statement with an error Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Condition' at line '1 and column '4550' is invalid. Action 'Apply_to_each_-_All_users' must be a parent 'foreach' scope of action 'Condition' to be referenced by 'repeatItems' or 'items' functions.'.'.
    Any suggestions?

    • @SuperJimmyosullivan
      @SuperJimmyosullivan Před 11 měsíci

      Got it working by removing one variable and referring to the get items directly