Query operators
Recently I have been working on a requirement to query accounts and contacts that have been modified during the last 30 minutes in Power Automate.Out of the box only the following time based filters are offered:
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/use-fetchxml-fiscal-date-older-datetime-query-operators
So as you can see a filter "Older than X minutes", but no filter "Last X minutes" is offered.
Also the "On or After" filter only allows as to provide a date and not the time part into the filter:
So we have to be a bit creative, to solve this challenge.
Compose - Date Time in Power Automate
As a first step we use the Compose action and provide the following expression to calculate the current date/time minus 30 minutes:Lets prepare some test data and modify one account:
Finally we test the flow. As we can see, the time minus 30 min. is correctly returned:
And the List records action returned our test account, that just recently has been modified:
Great articles and great layout. Your blog post deserves all of the positive feedback it’s been getting. PL-200: Microsoft Power Platform Functional Consultant
ReplyDeletecentered and descriptive articles written in this blog is surely very helpful for me similarly to for different who looking for such type of expertise. it is in reality going to grow to be useful in coming destiny. Power conditioner
ReplyDelete