Useful Power Automate Expressions and Tips

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),'Yes','No')

 

How to get values from CHOICE fields in dataverse

without having to use multiple action steps to 'get row via ID, etc, etc'

outputs('Get_a_row_from_Dataverse Table')?['body/prefix_choicefieldname@OData.Community.Display.V1.FormattedValue']



An AI artists impression of coding :'D


Comments

Popular posts from this blog

How to Copy/Duplicate a Table and Columns in a Dataverse Environment

Export Group Membership From Active Directory Using Power Query

Microsoft Flow - Apply To Each Limitation (5000 items)