Power Automate Switch, the alternative using a JSON object

Поділитися
Вставка
  • Опубліковано 19 лип 2024
  • In this video, you'll learn how to simplify your Power Automate flows by replacing complex switches and nested IF statements with a simple JSON object and an expression. With an understanding of JSON and objects, you can use an external data source, like a list, to manage your dynamic data in a flow. I'll show you how to repurpose a list item into an object that can be retrieved with a single key name, making your flows more efficient and easy to manage. If you're building flows with identical branches in a switch or hitting the switch option limit, this video is for you. And if you're using approvals and want dynamic approvers, using an object created from a List or Dataverse Table is an effective solution. So, watch this video and learn how to take your Power Automate skills to the next level.
    More JSON techniques:
    • How to write expressio...
    • JSON Array in Power Au...
    00:00 Intro
    00:47 JSON Object Basics
    04:28 Using an Object with Microsoft Forms
    06:30 Creating a dynamic object from a List
    13:17 Using an object with a Power App
    17:17 Outtro Please buy me a coffee www.buymeacoffee.com/DamoBird365 ☕
  • Наука та технологія

КОМЕНТАРІ • 22

  • @geralddahl9159
    @geralddahl9159 Рік тому +3

    Great use of / in order to bypass an error.

  • @franknielsen3219
    @franknielsen3219 Рік тому +3

    Brilliant, and a merry Xmas to you. Keep on the good job 👍👍

    • @DamoBird365
      @DamoBird365  Рік тому +1

      Cheers Frank. Merry Xmas to you too.

  • @alvarolang
    @alvarolang 8 місяців тому

    Great video! Thanks a lot for this content. It helped me a lot on a flow I'm creating to import itens from a Gallery (in power apps) to Excel Online(for business) !

  • @geralddahl9159
    @geralddahl9159 Рік тому +2

    Thank you for this rich and valuable content - so many applications for the methods you have explained so well - thank you.

    • @DamoBird365
      @DamoBird365  Рік тому +1

      Thanks Gerard, I’m really excited by this video. There is a lot of learning and ideas that can be taken from it. Glad you enjoyed it and thanks for the feedback. 👍

  • @jamesclark2020
    @jamesclark2020 Рік тому

    I’m going to try this out.

  • @analiliae.z6846
    @analiliae.z6846 Рік тому +1

    Hi Damien, you are a genious, this video inspire me to implement a solution in my flows because I had a lot of nested Conditions, this is really easy and great, I'm very grateful with you because all your videos are so interesting and I've been learning a lot with your content. At the begining I didn't understand but I keep triying and I did it. Cheers from Mexico, and I hope you are feeling ok this days :)

    • @DamoBird365
      @DamoBird365  Рік тому

      Amazing Ana, thank you so much for your comment 👍 I love hearing how this has helped folk with their solutions.

    • @analiliae.z6846
      @analiliae.z6846 Рік тому

      @@DamoBird365 As I said before, you are a great teacher!!! Thanks again 😃

  • @DileepanLearns
    @DileepanLearns Рік тому +1

    Grateful for your videos

  • @cvkealey
    @cvkealey Рік тому +1

    This is fantastic! Just one question about the use of the Get items action (around 7:15)...is that basically just a means to the end of converting the array (of items returned) into an object? I'm a big fan of using dynamic data for these types of flows, usually storing it in a SharePoint list and then Get items with a filter query to return just the relevant item based on the response in the form. If that list were large (many items or many columns or both), that apply to each action could slow things down and (in extreme cases) bump into the API call threshold.
    Thank you for all the amazing content you've created and I hope you have a chance to relax over the holidays!

    • @DamoBird365
      @DamoBird365  Рік тому +1

      The alternative is indeed a filter array or an odata filter on get items for a single dynamic status/option. I’ve a similar video for that too ua-cam.com/video/OEk6RMLQ89s/v-deo.html if it was a list of 100s/1000s items, I would agree that the apply to each would be inefficient. You can achieve the same repurpose using a single select and concat. If your data was being used dynamically multiple times across the flow, like the following www.reddit.com/r/MicrosoftFlow/comments/zr2xm7/power_automate_multiple_nested_if_statement this would work better as the values can be referenced directly with an expression.

  • @moyura2
    @moyura2 6 місяців тому +1

    Can the 'apply to each' action be replaced with 'filter and select' actions. Thanks for sharing.

    • @DamoBird365
      @DamoBird365  6 місяців тому +1

      You could. It’s about creating an object. A select will give you an array but you can remove the square brackets and replace with squiggly. I do similar in other videos. I like your thinking.

  • @mchandramohan6833
    @mchandramohan6833 Рік тому +1

    Why can't we just oData filter query instead ?

    • @DamoBird365
      @DamoBird365  Рік тому

      It really depends on the use case. If you’ve got multiple dynamic values, this will allow you to use them all. It’s a progressive solution, use an object for fixed dynamic values, potentially use an odata for a single value, or repurpose and call the data based on name. This video is similar to what you have suggested
      ua-cam.com/video/OEk6RMLQ89s/v-deo.html

  • @NiftyNinjaa
    @NiftyNinjaa Рік тому

    A fantastic Idea and Content!! 👌🏽 I have a quick question,
    I am trying to extract Site pages using "Get files (properties only)" but then there are around 7 columns having Managed Metadata (lookup columns). So I wasn't able to pull those 7 columns data. I then used "Get Items" action and tried to pull the values using "Select" and whenever I selected the lookup column values the "apply to each" started nesting on each value that I applied. My question here is, if I initialise the variable for each column and use "add property" expression, will I be able to bypass the apply to each nesting?

    • @NiftyNinjaa
      @NiftyNinjaa Рік тому

      I am trying to extract the whole site pages (we have 1000s of solution catalogs as pages) list into the Excel. I know we have "export to excel" button but wanted to automate. Will GET from "send an Http request to SharePoint" work?

    • @DamoBird365
      @DamoBird365  Рік тому

      Hi Chandrasekar, quite a question. I wonder if you could post this with screenshots on the forum? Much easier to discuss there powerusers.microsoft.com/

  • @geralddahl9159
    @geralddahl9159 Рік тому +1

    I wondered why you inserted a space into an expression around the five minute mark of this video AND THEN you explained why around the eight to ten minute mark of the video linked below, thx!!! ua-cam.com/video/p26sL3qHmfs/v-deo.html

    • @DamoBird365
      @DamoBird365  Рік тому

      It’s a clever little trick. I used to copy / paste the pills to get the expressions or peek at the code but then learned this trick. I suspect the expression editor will change soon but it’s handy for grabbing those expressions of existing dynamic content 👍