Monthly Archives: September 2018

Tips for Microsoft Flow expressions

Expressions are an easy way of modifying and formulating the data that we would want to capture in Microsoft Flow.

Expressions that I used recently

Adding 90 Days as an expression –

formatDateTime(addDays(utcnow(), 90), ‘yyyy-MM-dd’)
To calculate first day of the current month –
formatDateTime(startOfMonth(utcNow()), ‘dd-MM-yyyy’)
Calculating 3 days before the first day of the current month –
formatDateTime(addDays(addToTime(startOfMonth(utcNow()), 1, ‘Month’), -3), ‘dd-MM-yyyy’)

Joining conditions like ‘And’, ‘Or’ in conditional statements –

In order to join conditions, use the “basic mode” to create all the conditions needed and copy them.
Then remove the “@” symbol from the beginning, join them with commas and add the @AND or @OR condition required.
For eg. – The below condition checks if the Title or the “Email Contact” field has the text “mailto” in it.

@OR(contains(items(‘Apply_to_each’)?[‘Title’], ‘mailto’),
contains(items(‘Apply_to_each’)?[‘Email_x0020_Contact’], ‘mailto’))

To get this first I created a condition for checking if the Title contains the “mailto” text, which gets transcribed as:
@contains(items(‘Apply_to_each’)?[‘Title’], ‘mailto’)
Similarly, for the Email Contact column, the code gets created as:
@contains(items(‘Apply_to_each’)?[‘Email_x0020_Contact’], ‘mailto’)
In order to create an OR statement between them I had to remove the “@” symbol from the beginning, join them with commas and add the @OR condition required and finally it becomes –
@OR(contains(items(‘Apply_to_each’)?[‘Title’], ‘mailto’),
contains(items(‘Apply_to_each’)?[‘Email_x0020_Contact’], ‘mailto’))

Get SharePoint list items more than the default 100 items

The Get SharePoint list items method will only retrieve the first 100 records by default.
To expand that to the desired amount of records, we will have to edit the settings of the “Get Items” property

Flow1

Flow2

 

That’s all for now 🙂

Advertisements