I have a Get items which retrieves item with a date range of one year backwards, this works fine with the latest item as it will go back one year form the date, however if I modify an old item the filter will retrieve all items one year old plus the newer ones.
I have a variable RefDate to set date -1 Year
RefDate
addDays(triggerOutputs()?['body/StartDate'],-365,'yyyy-MM-dd')
What approach should I have to limit the filter to only items that are between StartDate and RefDate rather than anything that is greater than RefDate and also include the Staff filter?
Solved! Go to Solution.
Hi, the above does return no record, but you gave me the hint on how to add data to the formula with the brackes. I realised that all items will have a startDate, so I cretated a second variable refStart which is the StartDate of when the item is created.
so the formula is now:
Staff eq <'staff'> and (StartDate ge 'refDate' and StartDate le refStart)
And it works.
Thanks @Achavan for the hint!
Staff eq '<staff'> and ( StartDate ge 'refdate' and StartDate lt 'refdate')
Hope this work!
Hi, the above does return no record, but you gave me the hint on how to add data to the formula with the brackes. I realised that all items will have a startDate, so I cretated a second variable refStart which is the StartDate of when the item is created.
so the formula is now:
Staff eq <'staff'> and (StartDate ge 'refDate' and StartDate le refStart)
And it works.
Thanks @Achavan for the hint!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
77 | |
19 | |
17 | |
14 | |
11 |
User | Count |
---|---|
133 | |
34 | |
31 | |
31 | |
24 |