Power Automate flow variables - How to use them

Sdílet
Vložit
  • čas přidán 5. 10. 2020
  • In this video on Power Automate flow variables - How to use them, we will look at how we can reduce variables in our flows. The video covers initializing, setting, incrementing and appending data to variables.
    Topics covered:
    ✔️ Using Variable of type Object
    ✔️ Expressions - setProperty, getProperty, add, union etc.
    ✔️ Incrementing values
    ✔️ Appending to array
    ✔️ Tips & Tricks
    #FlowQuickTips #Flow #PowerAutomate #PowerApps #Variables

Komentáře • 168

  • @tenisviejos
    @tenisviejos Před 3 lety +9

    This is a godsend... Thanks a LOT for this. It's a brilliant approach to simplify so many big and complex existing flows we've at work. Thank you for sharing.

    • @RezaDorrani
      @RezaDorrani  Před 3 lety +2

      Thanks for watching. So happy to know this is useful.

    • @thatchercollin1508
      @thatchercollin1508 Před 2 lety

      i guess Im asking the wrong place but does someone know of a way to get back into an Instagram account..?
      I was stupid lost the password. I love any tricks you can offer me

    • @malcolmzaid2443
      @malcolmzaid2443 Před 2 lety

      @Thatcher Collin Instablaster :)

  • @edjk6278
    @edjk6278 Před 3 měsíci +1

    I’m not sure how often folks leave comments on videos that they’ve seen once and then gone back the video much later. This is one of those comments. I came across this when I first came across the power platform. I’ve never been a programmer or anything like that, and this particular video was way above my ability to comprehend at that time. Today, about two years later, I will use this as a best practice. I’m guessing when it comes to leveraging values using loops, I have some experimenting to do. But I should be able to leverage the item property to get this done. Although at this time, I cannot afford to become a member of your channel, I know what I know today because of you… Thanks mate!

  • @Collinmcd87
    @Collinmcd87 Před 3 lety +3

    Reza, I love your channel man. Thank you for helping out the IT community. This would be very hard for me to pick up without your videos and initiative. Much respect.

    • @RezaDorrani
      @RezaDorrani  Před 3 lety

      Thank you so much for your kind words. I try my best to provide valuable content and it means a lot to get such feedback.

  • @gorgonhaas6429
    @gorgonhaas6429 Před 2 lety +1

    This is so helpful and time-saving - you point out the essentials and more in a very concise way. Thank you!

  • @dougydoe
    @dougydoe Před 3 lety +1

    A great overview to using variables with expressions. Thanks for sharing.

  • @edjk6278
    @edjk6278 Před rokem +1

    You have inspired me to reshape my business by adding these technologies. Your lessons are very helpful. I’ve gotten myself in a bit too deep with a project for my number 1 client. I continue to search videos for answers to some of my new challenges. Nonetheless I always learn things from you. Thank You Reza

    • @RezaDorrani
      @RezaDorrani  Před rokem

      You are most welcome and thanks for watching and learning from my videos.

  • @hackcode8701
    @hackcode8701 Před 3 lety +1

    very interesting, thanks for share

  • @travis570
    @travis570 Před 2 lety +1

    Reza, this video was brilliant! Thank you so much.

  • @flipopperman8741
    @flipopperman8741 Před 2 lety +1

    Thanks a lot Reza, it is also a useful tutorial on how to update object properties and arrays elements in general. Thank you again for putting this together.

  • @eddepacheco
    @eddepacheco Před 2 měsíci +1

    Very helpful. Thank you.

  • @marciokataoka
    @marciokataoka Před 3 lety +1

    Tips like these make our lives easier! ☺

  • @FairviewRCflier
    @FairviewRCflier Před 9 dny +1

    Wow! I’ll give this a try

  • @ammadkhan4687
    @ammadkhan4687 Před 2 lety +1

    This is Gold worth Information.. Saluting !!!

  • @berggrog1
    @berggrog1 Před rokem +1

    Nice Explanation RD! Thank you for the video and tips

  • @AssassinUK
    @AssassinUK Před 2 lety +2

    WOW .. Great video. Love how your flows work 1st time all the time! 😅

  • @vedransehovic6321
    @vedransehovic6321 Před 2 lety +1

    This is fantastic, thank you Reza!

  • @mondlintuli221
    @mondlintuli221 Před rokem +1

    This is very helpful thanks a lot Reza :)

  • @ebogart42
    @ebogart42 Před 3 lety

    thanks - very informative!

  • @sokgat7019
    @sokgat7019 Před 3 lety +1

    Great idea. Love it !!!!

  • @LapaConsult_Ex_Macraris
    @LapaConsult_Ex_Macraris Před 3 lety +1

    Thank you again for this video... as part of my learning I would like to do a similar video and publish it in Italian. Thank you!

  • @areebasameen7832
    @areebasameen7832 Před 3 lety +1

    Thanx Reza for such a beautiful explanation.....

  • @annettegarberina-woodall8758

    Awesome job, you explain very well.

  • @amywoodfin6195
    @amywoodfin6195 Před 3 lety +1

    Excellent, easy-to-follow instructions for someone that has been desperately trying to understand what variables are and what role they play in flows. Question - is there any way to hide the initial variables that you initialize so you just see the Compose? That would make it super clean! Regardless, I really appreciate your training style and info. On to your next tutorial. Cheers!

    • @RezaDorrani
      @RezaDorrani  Před 3 lety

      Thank you for the amazing feedback Amy.
      You cannot hide the actions inside flow.
      Hope you enjoy all the videos on this channel.

  • @GroovyMisfit
    @GroovyMisfit Před 2 lety +1

    This is awesome. I watched this like 5 times.
    BTW, How did you do the magnifying glass? That was nice.

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      Thanks for watching so many times :)
      The magnifying is a feature of my software recording tool Camtasia.

  • @paolovr1970
    @paolovr1970 Před rokem +1

    Thanks 🙏🙏🙏 very interesting Reza

  • @WorkProfileScot
    @WorkProfileScot Před 11 měsíci +1

    Thanks so much for this, Reza! Running into a issue and hoping you can help. I have a variable called varProfile mimicking yours. I would like to use the compose function with the 'setProperty' expression. However, I would like it to compose two var's within the json of the variable, varProfile.
    For example, I would like it to set the "varApproverName" and "varApproverComments" within the variable varProfile.
    I am able to have it compose both of those but I can't get it to set both as it runs into an error of "The variable 'varProfile' of type 'Object' cannot be initialized or updated with value of type 'String'. The variable 'varProfile' only supports values of types 'Object'."
    Would I need to run the compose and set variable with the output twice for each value? Is it possible to do it in just one of each?

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

      I have not come across this issue & hence not sure what the resolution is. Debugging issues here on chat is not a good option. I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com

  • @rafianumrex6384
    @rafianumrex6384 Před rokem +1

    Hi @Reza... thanks for your videos... well I was curious if there are many variables in a flow can we store all of them in a single place(as we do to add all the related steps in scope), variables can not be added to scope.. so is there any why to place all in a single block.

    • @RezaDorrani
      @RezaDorrani  Před rokem

      Initialize variable actions cannot be in a scope.

  • @raulmintz2682
    @raulmintz2682 Před 3 lety +1

    Excellent

  • @007lbp
    @007lbp Před 2 lety +1

    Excelent content!! How to learn more about expressions in power automate ? Thanks and great job!

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      Thank You.
      For expressions check czcams.com/video/O97IdCbfMQI/video.html

  • @josheroh4945
    @josheroh4945 Před 2 lety +1

    Thanks Reza! However, does anyone know if it is possible to set multiple properties of a variable at once?

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      Possible. I believe I have a sample flow on my GitHub repo that shows that.
      Check github.com/rdorrani/Microsoft-Flow/blob/master/Expressions401-ReducenumberofVariables-SaveAPICalls_20210211210303.zip

  • @comprascbgolfe9191
    @comprascbgolfe9191 Před 3 lety +1

    Hi Reza! Do you have any video that instead of using hard coded schema receives variables informations like a json ou collection coming from powerapps? tks!

    • @RezaDorrani
      @RezaDorrani  Před 3 lety

      A lot of them.
      Check -
      czcams.com/video/tQCBWMR7T64/video.html
      czcams.com/video/r3UC3TMXhlI/video.html
      czcams.com/video/Da4do2DxmJE/video.html

  • @sueamin2788
    @sueamin2788 Před 2 lety +1

    Hi Reza: Thank you for this very useful video. Also, do you have a video showing a variable holding all the items in the list having say color column = Purple? and then in the automate use that variable (selected records of the list) to do the next step like compare with another list or update it, etc. If so, can you please direct me to that link? Thanks again for your ingenuity in making things easier for all of us!

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      Thank You.
      I do not have a specific video on this use case. May be it was a part of one of my flow videos.
      I will recommend you check on the forums at powerusers.microsoft.com/

  • @robofski
    @robofski Před 3 lety +1

    Genius!

  • @jdkarns
    @jdkarns Před 2 lety

    Thanks for the video! Question? So then what do you do with the JSON file you created? How do you use the file with all the variables in Power Automate?

    • @RezaDorrani
      @RezaDorrani  Před 2 lety +1

      It is not a file. It is just JSON data. You can use it across your flow as a variable and read data from within. You can also update its data in the flow.
      I uploaded a sample flow showcasing it on my GitHub repo github.com/rdorrani/Microsoft-Flow/blob/master/Expressions401-ReducenumberofVariables-SaveAPICalls_20210211210303.zip

    • @jdkarns
      @jdkarns Před 2 lety +1

      @@RezaDorrani Thank you

  • @arshad801
    @arshad801 Před 3 lety +1

    Awesome

  • @SirviscaSH
    @SirviscaSH Před 2 lety +1

    👏👍

  • @sandrapalmer3572
    @sandrapalmer3572 Před rokem +1

    Hi Reza, thank you for all your videos, they are really helpful and I have created many flows using your videos.
    Would you be able to do a demo of how I could create a Power Automate Flow to calculate the number of characters in a specific question response whenever a MS Form is submitted.
    Currently my flow takes the Form into a List and I would like a field in this list to detail that character count (which includes all words, spaces, puntuation etc in the count).
    Hope you can help. Many tahnks

    • @RezaDorrani
      @RezaDorrani  Před rokem +1

      I make videos when I get multiple requests on a topic. Each quarter, I ask for topic suggestions on "Community Tab" of my channel. Most voted ideas get added to backlog. The topic suggestion post is currently active.

  • @ufffyegaane-onlyforyou9837

    Really superb. Is there any help link available by Microsoft for those functions?

    • @RezaDorrani
      @RezaDorrani  Před 3 lety

      aka.ms/learnexpressions
      docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

  • @aamirghanchi9487
    @aamirghanchi9487 Před 4 měsíci +1

    Thank you for theis great video! What about the Date/Time variables. I see them in the documentation for the desktop flow but not the cloud flows. I wanted to get the max and min of two dates but there is no straightforward way of doing it.

    • @RezaDorrani
      @RezaDorrani  Před 4 měsíci +1

      I have not tried max and min for dates. Im sure there are expressions that can be framed for it. I would recommend checking or posting your query on forums in case someone has done something similar
      powerusers.microsoft.com

    • @aamirghanchi9487
      @aamirghanchi9487 Před 4 měsíci +1

      Thank you Reza! I've found a way to do it through ticks() 🙂

  • @cyriltresor3589
    @cyriltresor3589 Před 2 lety +1

    Thank you very much, thanks to your videos I have managed to set up a workflow that works correctly from a form to the sending of a summary email.
    But I still have an minor issue. I constructed a Likert-type form. And I would like to get in a variable only a certain type of value. For example. Question 1 Answer 1 Answer 2 Answer 3
    My idea would be to have a variable that would store only the A3's to display in an email, but I'm interested in another idea. The long way would be to do it with conditions, but that's not very elegant when you have a lot of possibilities.

    • @RezaDorrani
      @RezaDorrani  Před 2 lety +1

      I do not have a video reference on this scenario and would have to try it out to provide guidance.
      I did videos with forms (might have included likert type). Check czcams.com/video/kbqXsKPTmZk/video.html & czcams.com/video/4eWGdi_C2hQ/video.html
      I would also recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com

    • @cyriltresor3589
      @cyriltresor3589 Před 2 lety +1

      @@RezaDorrani Thanks Reza, I will do

  • @MohammadAli-ts2ev
    @MohammadAli-ts2ev Před 2 lety +1

    Hi Reza,
    Thank you for the informative video.
    I am about to be a power automate dev following your videos:)
    I am stuck to a place..
    In Power automate/Flow, how can we set the value of any single cell (i.e cell A2) of a table (of Excel Online for Business) to a variable?

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      Thank You.
      I do not have a video based on your scenario.
      There is one on excel czcams.com/video/Kupz71dWYyY/video.html which may help.
      I will also recommend you check on the forums at powerusers.microsoft.com/

  • @BoyTukaness
    @BoyTukaness Před 2 lety

    Hi Reza, do you have video wherein
    You copy the array values from one sharepoint to another? but instead of an array you convert it into a text value? Thanks in advance

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      I do not have a video on that. I would recommend to check on the forums at powerusers.microsoft.com

  • @samfisherzz
    @samfisherzz Před 11 měsíci +1

    Hi Raza!
    I am new to Power Automate and have been learning from your videos. I am trying to send MS forms response to Sharepoint List. Some response questions have multiple choice, so I followed the popular method of initialize an array variable, remove extra symbols from Microsoft Forms string output, split the previous line into an array, append to array variable using a formula.
    It works perfectly, but now I have created multiple array variables for each multiple question in a single initiate variable action as you have described. How can I get the multiple choice response for each question from MS forms into its corresponding variable?

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

      I do not have a video reference on this specific scenario and would have to try it out to provide guidance. I recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.

  • @wrmbanks2260
    @wrmbanks2260 Před 2 lety +1

    Really really helpful video. I'm curious though, is it possible that each time a row of data in sql has been created, that a flow can take that data and initialise a variable in another flow, using the same idea you've demonstrated here?

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      New row in SQL has a trigger in flow.
      Why would you want to initialize a variable in another flow? Why not the work done by the flow that gets triggered when new row is added in SQL?

    • @wrmbanks2260
      @wrmbanks2260 Před 2 lety

      @@RezaDorrani So i have several flows which need to be set up the way they are, as it's a multi-step process which requires retrieving data using one api feeding it into a sql table, then triggering another flow to retrieve further information from another site. Then the data I need for a third table is based upon a column from the first table. At the moment, I've manually inputted initialised/setup variables which the third table uses to insert a row, however for each new record that is added, a corresponding variable needs to be added to the third sql table to search.

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      @@wrmbanks2260 If you need to pass the value across flows, then you need to look into child flows. docs.microsoft.com/en-us/power-automate/create-child-flows

    • @wrmbanks2260
      @wrmbanks2260 Před 2 lety +1

      @@RezaDorrani Great thanks for the link! Looks to be what I need 🤞🏻

  • @kanwalsaini9717
    @kanwalsaini9717 Před 3 lety

    Hello rezza ,
    Good morning . Hope you are doing good and staying safe.
    Wanted to check if there is another way to declare and initialize multiple variables in one place. Creating so many variables makes the flow design very bigger and fatterand wierd to read.
    I have one use case where i need to send emails to owners and admins to have right no of ownership for their sites . there will be scenarios like 0 SCA and 1 owner , then send email to owners , 1 SCA and 1 or more owners , send eamil to SCA. , like that for other more scenarios.
    as of now I created a flow with declaring 2 string variables for Owners and admins respectively . 4 array variables for owners to store the names of owners based on their count calculated using length function . Similarly 4 variables for admins doing the same thing. Then in apply to each loop I am applying conditions based on the count and appending it to respective array variables which would then be used to send emails to respective count owners (like 1 wale or 2 wale )in last step. then in another apply each same thing is designed for admins. now when I try to combine both the outputs in my final condition to send email then I am getting warning it should be part of parent for each . Is there another way to do so without creating so many variables doing above steps . I want to make my flow simpler .with my approach I am assuming it is becoming more complex

    • @RezaDorrani
      @RezaDorrani  Před 3 lety

      I would have to recreate your scenario to provide any guidance. I would recommend you post your issue/query with screenshots on the forums at powerusers.microsoft.com

  • @mocanada304
    @mocanada304 Před 9 měsíci

    Hi Reza,
    Amazing videos as always.
    What would be the syntax for updating the array element within the object variable? and also the syntax from removing an array element within the object variable?
    Thank you,

    • @RezaDorrani
      @RezaDorrani  Před 9 měsíci +1

      Thanks!
      I did this video a while ago and covered most scenarios. Not sure if this was covered or not.
      I do not know the syntax by heart. It would be best to check the documentation for the functions showcased in video.

    • @mocanada304
      @mocanada304 Před 9 měsíci

      Hi again@@RezaDorrani,
      ChatGPT provides the following syntax.
      For updating.
      union(variables('yourArray'), { "index": 0, "value": 'new_value' })
      and for removing.
      union(take(variables('yourArray'), indexOfElementToRemove), skip(variables('yourArray'), indexOfElementToRemove + 1))
      Does it look ok to you?
      Thanks again,

    • @RezaDorrani
      @RezaDorrani  Před 9 měsíci +1

      @@mocanada304 I cannot guess here on chat without reproducing the same on flow. Chat is pure text. Looks good - Yes but that may not be the best answer.
      I would recommend posting your query/issue with screenshots on the forums at powerusers.microsoft.com

  • @vivekanandade7049
    @vivekanandade7049 Před rokem +1

    Thanks Reza, This is very useful video and I am using the same approach in my tasks, However I am having query, how to update multiple properties. in your video you have demonstrate to update one property using setProperty however If I would like to update vName, vTitle and vCompany using one compose, is that possible?

    • @RezaDorrani
      @RezaDorrani  Před rokem

      By writing multiple expressions together. Possible!

    • @vivekanandade7049
      @vivekanandade7049 Před rokem

      @@RezaDorrani I have tried with multiple setProperties in one compose however it is not when I try to set to variable, it is not working. Can you please help with any example with multiple property set. Thanks in advance.

    • @RezaDorrani
      @RezaDorrani  Před rokem

      @@vivekanandade7049 I will recommend posting your issue with screenshots on the forums at powerusers.microsoft.com

  • @jihenhnena2247
    @jihenhnena2247 Před 3 lety

    Thank you Rezza, I'm wondering how can we use variables when we have to call a soap API?

    • @RezaDorrani
      @RezaDorrani  Před 3 lety

      When making the SOAP call via flow you can just pick the variables from dynamic content.

  • @arcusatmos6367
    @arcusatmos6367 Před 2 lety +1

    Nice video. It save my work. Can we get the json code from a file? thanks

  • @jaredwaterman5868
    @jaredwaterman5868 Před 2 lety

    Hi Reza, can you explain how to convert a SharePoint date (string: 2011/4/25) into a number format to update an Excel field value that won't accept a date in string format? Thanks!

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      You would need to use expressions. I will recommend you check on the forums at powerusers.microsoft.com/

  • @smitty7326
    @smitty7326 Před 10 měsíci

    any way to make these variables into global variables that can be used in PVA to carry information across multiple topics?

    • @RezaDorrani
      @RezaDorrani  Před 10 měsíci

      I have done very little work with PVA so not sure.
      I will recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.

  • @edjk6278
    @edjk6278 Před 3 měsíci

    Is it possible to use object variables in a loop action (sum)?

    • @RezaDorrani
      @RezaDorrani  Před 3 měsíci

      Probably possible but not something I have tried

  • @MrAlienw
    @MrAlienw Před 6 měsíci

    How do you update multiple values in the object?
    For me my object is with empty variables at first, but if I put multiple SetProperty, SetProperty etc in the Compose Input, I get multiple Outputs with only the associated variable updated

    • @RezaDorrani
      @RezaDorrani  Před 6 měsíci

      The video is the best reference I have.
      I have not come across the mentioned issue and hence not sure what the cause could be.
      I recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com

  • @sagar_s1412
    @sagar_s1412 Před 7 měsíci

    Hi Rezza ,
    I am using setproperty in an apply to each loop and updating new updated value of the object to excel column data but after the first iteration the data resets to 0 rather than holding the previous updated value can you help me with this

    • @RezaDorrani
      @RezaDorrani  Před 7 měsíci

      I have not come across this issue and hence not sure what is the cause for your issue. I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com

  • @sundrapillay6668
    @sundrapillay6668 Před 3 lety +1

    Thanks Reza

  • @vijayalakshmipatil6402

    hello can you tell how we can use And OR opertion in condtion in powerflows

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      The flow creator is creating the AND OR conditions.
      docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#logical-comparison-functions

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

    What if you have multiple vName values and you just want to select Justin Smith as an example, how would you do that?

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

      Did this video a while ago. I would have to try it out to know how that can be done.

  • @erinfield1943
    @erinfield1943 Před rokem

    4:33- is this what I need to do to take the objects out of my arrays in Power BI? Power BI dynamic content is arrays, not objects, so every time I try and do something, it puts it in an Apply to Each, and there are just WAAAY too many loops going on in my flow, it's insane. Do I have to do this Expression thing to all my dynamic content so I can have a normal clean flow?

    • @RezaDorrani
      @RezaDorrani  Před rokem

      Check my videos on power bi and power automate.

  • @colby4390
    @colby4390 Před 2 lety

    What if you need to us the "Ask in Power Apps" feature? How would you type that?

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      Add compose action, select ask in Power Apps.
      Then go to peek code for compose action and copy the expression formula.

  • @srv158
    @srv158 Před 2 lety

    Hi Reza I have a question: Is it possible to remove comma from a number value and convert that decimal number to whole number in power automate platform. For example: I want to convert 1,27.89 to 128. Here I want to remove comma after 1,2XXX and covert the decimal number 127.89 to 128. Please help

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      I would guess Yes but would require expressions. I do not have a video reference on this and would have to try it out myself to know more about it.
      I will recommend posting your query with screenshots on the forums at powerusers.microsoft.com
      May be someone has done something similar.

  • @madunurivamsidhar2235
    @madunurivamsidhar2235 Před 2 lety

    Can we set boolean in set property.

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      Yes. Just use true or false as expression to set its value.

  • @snuggles4eva
    @snuggles4eva Před 3 lety

    I have an MS Form that creates or updates tables on Dataverse through Power Automate which all works fine. I have a section which requires a one to many relationship (as a repeating table) for the record I am updating. In this section the form has a set of 3 questions which are repeated should the worker have extra work and needs to enter more answers as shown in the diagram. I set up a simple JSON which brings out the first set of data but I don't know how to pick up all three. To complicate matters the user may not need to fill any of the sets if there are no extra works. Do you have a video on getting a 'one to many' records from an MS Form to Dataverse or similar?
    Form Main Table Multi Table
    Question1 ID Auto ID Field1 Field2 Field3 Foreign Key
    Question2 123 234 Answer1 Answer2 Answer3 123
    Question3 235 Answer1 Answer2 Answer3 123
    More Questions Y/N 236 Answer1 Answer2 Answer3 123
    Question1
    Question2
    Question3
    More Questions Y/N
    Question1
    Question2
    Question3
    More Questions Y/N

    • @RezaDorrani
      @RezaDorrani  Před 3 lety +1

      Looks like a question related to a specific use case. This would be tough to solve on chat. I would recommend you post your query with screenshots on the forum at powerusers.microsoft.com/

    • @snuggles4eva
      @snuggles4eva Před 3 lety +1

      @@RezaDorrani Thank you Reza. I will do that.

  •  Před 3 lety

    How can I merge a function into an expression to compose one outcome? Goal: To return the JSON value of a property name dynamically as a simplified Switch control. E.g. outputs('monthsTableJSON').March but I want that .March or ?['March'] to be replaced with a String coming from formatDateTime(utcnow(), 'MMMM')

    • @RezaDorrani
      @RezaDorrani  Před 3 lety

      Not sure I understood your question. You can write multiple expressions together.
      Check aka.ms/learnexpressions to learn more about expressions.

    •  Před 3 lety +1

      ​@@RezaDorrani Thank you, I ♥ those series, watched several times, finally I made my simple expression work, no doubts you did not understand my question fully. Was too simple and obvious. 👍 outputs('monthsTableJSON')?[formatDateTime(utcNow(),'MMMM')]

    • @RezaDorrani
      @RezaDorrani  Před 3 lety +1

      @ Great!

  • @pedrosanteloy
    @pedrosanteloy Před 3 lety

    Hello... How could I initialize a variable (integer) with null value?

    • @RezaDorrani
      @RezaDorrani  Před 3 lety

      You could use the expression null

    • @pedrosanteloy
      @pedrosanteloy Před 3 lety

      @@RezaDorrani hmm my scenario is:
      I have an ID that can be blank sometimes because it is a optional field from my form.
      Power Apps doesn't run my flow once the variable is set up as integer and the ID value is blank.
      I think that null expression would not work because the initialize variable step is not even triggered. I guess.

    • @RezaDorrani
      @RezaDorrani  Před 3 lety +1

      @@pedrosanteloy Now thats a different use case. Depends on how flow is being triggered. Tough to provide guidance here on chat without looking at the flow and scenario. I would recommend you post your issue with screenshots on the forums at powerusers.microsoft.com

    • @pedrosanteloy
      @pedrosanteloy Před 3 lety

      @@RezaDorrani Thank you, Reza! I will (:

  • @MisteryOfFaith
    @MisteryOfFaith Před 2 měsíci

    Can you take the variable output into a csv file?

    • @RezaDorrani
      @RezaDorrani  Před 2 měsíci +1

      Possible but not something I have tried

    • @MisteryOfFaith
      @MisteryOfFaith Před 2 měsíci

      @@RezaDorrani I have office 365 groups that I would like to retrieve the members of each groups into a csv file. I have captured the output into a variable then parse json, used a select component after parse json get the get the columns that I want to retrieve.
      After the select component I have used create csv table component and then create file to store the csv into my share point document
      My biggest issue is that some data get created into the csv file while some data keep failing and I don’t know what is causing some records to fail nor how to make those data work

    • @RezaDorrani
      @RezaDorrani  Před 2 měsíci +1

      @@MisteryOfFaith I do not have a video reference on this scenario and would have to try it out to provide guidance. I recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com

    • @MisteryOfFaith
      @MisteryOfFaith Před 2 měsíci

      @@RezaDorrani thank you 🙏

  • @skim32
    @skim32 Před 4 měsíci

    Trying to understand the benefits of using this method. The idea was to reduce the number of variables and complexity. But, If the variables you want to work with all require manipulation, you will need to create a compose statement for each variable anyways. So you are essentially replacing the initialize variable with a compose. So not sure if you are really reducing the flow's complexity. You are making it easier to read the variables up at the top. However, making it more complex to read the operations that are performed on variable throughout the flow. As each manipulation will require a compose and set variable. And to analyze what the operation is doing; I have to analyze an expression of each of the compose. I am new to power platform, and maybe I am missing something.

    • @RezaDorrani
      @RezaDorrani  Před 4 měsíci

      Idea was to reduce number of variables. Reducing complexity was not a claim.
      Complexity is high. You can update 4-5 variables in one go with a single compose vs what you could do with multiple variables.
      I would suggest sticking with regular initialize variable and update variable if complexity showcased in video is high.

    • @skim32
      @skim32 Před 4 měsíci +1

      @@RezaDorrani After working on a project for the past 2 hours (after I posted my initial comment) I realized the benefit. I'm working with a nested loop where I am incrementing 10 variables by 1. Then once one interation is done, I have to reset all variables to 0 and do 2 more iterations. That means I got to initialize 10 variables. Then increment 10 variables. Then set 10 variables back to 0. Using your method. I have 1 record variable. I increment 10 variables inside of the record variable. And then reset all variable to 0 in one compose command. At least, that is what I have conceptualized right now. Thanks. Your content has greatly helped me.

    • @skim32
      @skim32 Před 4 měsíci

      @@RezaDorrani Any chance do you have a tutorial on how to set property to update multiple variables? I can't seem to figure that part out.

    • @RezaDorrani
      @RezaDorrani  Před 4 měsíci

      @@skim32 I don’t

  • @mlmiles1
    @mlmiles1 Před 2 lety

    I attempted to recreate your simple example and run the flow, but I got the following message:
    The variable 'varExpertise' of type 'Array' cannot be initialized or updated with value of type 'String'. The variable 'varExpertise' only supports values of types 'Array'.
    Where did I go wrong?

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      As per the error, you are providing data type string where the expression expects an array. I will have to look at your flow in action to provide guidance. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com

    • @mlmiles1
      @mlmiles1 Před 2 lety +1

      @@RezaDorrani Thanks a bunch! I will do that!

  • @laminkhant8875
    @laminkhant8875 Před 2 lety

    i used parallel flow, if i used for 10 comment for this can be?

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      10 comment? I did not understand your question

    • @laminkhant8875
      @laminkhant8875 Před 2 lety

      @@RezaDorrani I have 10 start and wait approval process (using parallel flow), for each i made initialize variable for comment. That why they are different response comment come from output. So i want to orgnize that 10 variable can we put this method can work? thanks for patient my english.

    • @RezaDorrani
      @RezaDorrani  Před 2 lety

      @@laminkhant8875 Im not sure about that. Something you would have to try out and see if it works.