Posts

Showing posts with the label tricks

Useful Power Automate Expressions and Tips

Image
Wanted to provide a few Power Automate tips and tricks when using expressions and also when using Dataverse Connections. Replace semi-colons with commas  Useful when working with Choice Fields replace(outputs('Get_a_row_from_Dataverse Table')?['body/ChoiceField'],';',',')   If field is empty, show NA Useful when populating an email/document with values and you don't want the fields to have blank values. if(empty(outputs('Get_a_row_from_Dataverse Table')?['body/ChoiceField']),'N/A',outputs('body/ChoiceField'])   If a boolean value is true, show YES Useful for making the wording inside emails/documents make more sense to a human! if(outputs('Get_a_row_from_Dataverse Table')?['body/BooleanField'],'Yes','No')   If a boolean is true different method for certain scenarios if(equals(outputs('Get_a_row_from_Dataverse Table')?['body/BooleanField'],true),'Ye...

Microsoft Flow - Use the Take() Function to quickly test your loops

Image
The Take() function can be used to filter an array.  For example, if you have an Array with 1000 items in it, you can use the Take() function to only grab the first 5. Why Occasionally when you are building a Flow, you need to run a loop across a large array.  The loop can take hours to run depending on how many items are in the array and how many actions are in the loop.  Use the Take() function to quickly check that your loop will run successfully on a small subset of the array. How In this example we are going to create an array of 10 numbers, and iterate through a subset of the array. The steps are as follows: Create an 'Initialize Variable' Action, and build an array with some values in it - here's some values for you: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] Create an 'Apply to Each' Action and do the following click in the blank text box, navigate to the 'Expression' Tab and type: take() now cl...