Power Automate useful things

In List rows, how to filter on 2 or more things:

name eq 'Yertle Turtle' and address1_city eq 'Pond'

name eq 'Basic User' or name eq 'Delegate'

Get the first item from a list rows:

first(outputs(List_rows_in_users')?['body/value'])?['systemuserid']

Check to see items are returned:

length(outputs('List_records')?['body/value']) in condition is greater than 0

Get the trigger details for create or modify

triggerOutputs()?[‘body/SdkMessage’] returns Create, Update.

If Syntax : if(equals(outputs(‘AccountRecord’)?[‘body/industrycode’], 1), ‘Yes’, ‘No’)

Check to see if a null value is returned:

if(equals(email,null),dothis,dothat)

Check to see if a empty cell in Excel is returned:

Trigger conditions to allow or prevent Flow from firing:

  • @not(contains(triggerBody()?['from'],'help@mydomain.co.uk')) for email
  • @true(triggerBody()?['my_field'])
  • @not(empty(triggerBody()?['ltcit_ithelpdeskusers']))

Get a URL to the current Flow (geo region may need to change!)

concat('https://unitedkingdom.flow.microsoft.com/manage/environments/',workflow()['tags']['environmentName'],'/flows/',workflow()['name'],'/runs/',workflow()['run']['name'])

Simplifying Writing expressions:

Instead of :

body('Filter_array_Result')[0]?['outputs']?['body']['error']?['message']

you can write more simply

body('Filter_array_Result')[0].outputs.body.error.message

Need to look into more for sure!

Get the triggering user:

triggerBody()['RunAsSystemUserId']  

or

triggerOutputs()?[‘body/RunAsSystemUserId’]

Write a null user to an entity record lookup, when confronted with systemuser(null).

Escape out quotes in strings:

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s