Hello,
I am working on a flow where I am generating tables for team tasks based on due dates.
So far I have the following expressions:
Past Due Items -
@and(not(equals(item()['Status'], 'Completed')),
not(equals(item()['Owner'], 'Owner)),
not(equals(item()?['DueDateTime']?['DateTime'],Null)),
lessOrEquals(item()?['DueDateTime']?['DateTime'], addDays(utcNow(),0)))
Items Due This Week -
@and(not(equals(item()['Status'], 'Completed')),
not(equals(item()['Owner'], 'Owner')),
not(equals(item()?['DueDateTime']?['DateTime'],Null)),
and(greater(item()?['DueDateTime']?['DateTime'],addDays(utcNow(),7)),
lessOrEquals(item()?['DueDateTime']?['DateTime'],addDays(utcNow(),14))))
I need to create another set of dates that have tasks completed ahead of time which means that they are in the "Completed" state but have been completed 3 days or more before the due date.
So far this is what I have -
@and(not(equals(item()['Status'], 'NotStarted')),
not(equals(item()['Status'], 'InProgress')),
not(equals(item()['Status'], 'WaitingOnOthers')),
not(equals(item()['Owner'], 'Owner')),
not(equals(item()?['DueDateTime']?['DateTime'],Null)),
and(and(greater(item()?['DueDateTime']?['DateTime'], addDays(utcNow(),0)),
lessOrEquals(item()?['DueDateTime']?['DateTime'], addDays(utcNow(),7))),
less(item()?['LastModifiedDateTime'], item()?['DueDateTime']?['DateTime'])))
Any help would be appreciated!
Solved! Go to Solution.
Hi @Allanmv ,
According to your description, it seems that you would like to filter out items that that are in the Completed status but have been completed 3 days or more before the due date.
I have made a simple flow for your reference.
Under the action List all tasks, add an action Filter array with the following code:
@and(equals(item()['Status'], 'Completed'), lessorequals(item()?['CompletedDateTime']?['DateTime'],adddays(item()?['DueDateTime']?['DateTime'],-3)))
Add a simple Compose action to show the subject and the completed date and Due date for the filtered item.
Best regards,
Mabel
Hi @Allanmv ,
According to your description, it seems that you would like to filter out items that that are in the Completed status but have been completed 3 days or more before the due date.
I have made a simple flow for your reference.
Under the action List all tasks, add an action Filter array with the following code:
@and(equals(item()['Status'], 'Completed'), lessorequals(item()?['CompletedDateTime']?['DateTime'],adddays(item()?['DueDateTime']?['DateTime'],-3)))
Add a simple Compose action to show the subject and the completed date and Due date for the filtered item.
Best regards,
Mabel
User | Count |
---|---|
88 | |
79 | |
45 | |
29 | |
25 |
User | Count |
---|---|
38 | |
29 | |
26 | |
22 | |
18 |