cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vgandi
Regular Visitor

Trigger a flow when the field value is not updated after creation of an new item

Hi,

 

I'm creating the support request tracker using SharePoint List. Where I'm having support request status field as default value as 'New Request'. 

I'm looking to send an mail via the power automate flow. If the status was not changed with in 3 days after creating the item.

 

Can some one please help me on this how I can achieve this? 

 

Just to let you know I'm using the basic list features of SharePoint list not using power APP. @RezaDorrani 

 

Thanks,

Venkatesh Gandi

 

1 ACCEPTED SOLUTION

Accepted Solutions
poweractivate
Community Champion
Community Champion

@Vgandi 

 

You can have a "recurring Flow" which runs periodically (this is a type of Flow that will run periodically, you set "Recurrence" as the Trigger). For example, the Flow could run once or twice a day or so. In this Flow, you query for items whose modification date/time are 3 days or older from the current date/time that the recurring Flow is being run. For those items which are returned, you do what you want with them related to what should be done if the status has not been changed within 3 days.

View solution in original post

4 REPLIES 4
poweractivate
Community Champion
Community Champion

@Vgandi 

 

You can have a "recurring Flow" which runs periodically (this is a type of Flow that will run periodically, you set "Recurrence" as the Trigger). For example, the Flow could run once or twice a day or so. In this Flow, you query for items whose modification date/time are 3 days or older from the current date/time that the recurring Flow is being run. For those items which are returned, you do what you want with them related to what should be done if the status has not been changed within 3 days.

View solution in original post

Vgandi
Regular Visitor

@poweractivate Thanks for showing me the path. Your solution seems reasonable. I never queried the SharePoint items in Power Automate(I'm new to power automate). I will do some research on querying the SharePoint items. Thank you once again.

 

Edit: Just researched about the OData querying I think this is great feature. Just wanted to share the link which helped me, so that it can be useful for others who are looking for the same.

@Vgandi 

 

You are right, it might be useful to specify this part. The link you placed to the YouTube video is also, I would agree, useful, at approx 16:08 in it goes into the key point. Just in case for the quick reference, I will place the key point directly in this post for the quick reference:

 

Yes, an OData query (specifically, OData Filter Query) would be the best way to do this. The OData Filter Query would be something like this:

 

 

 

 

getPastTime(3,'day','yyyy-MM-dd')

 

 

 

 

Basically what above does, is it gets a timestamp 3 days prior to the current time. Then it can be used to compare this date with the current column. 

 

Here is a reference to the getPastTime function (docs.microsoft.com)

 

Please note that 'yyy-MM-dd' might need to be replaced with whatever format is suited for the specific scenario. Here is reference to the Custom date and time format strings (docs.microsoft.com)

 

The Odata query then becomes

 

 

 

 

SomeColumn lt '<<insert expression here>>'

 

 

 

 

For <<insert expression here>> this part must be done inside the expression (whereas the rest of the query is not an expression).

 

 

 

 

getPastTime(3,'day','yyyy-MM-dd')

 

 

 

This above part goes inside where it says <<insert expression here>>

 

Below is a graphic to illustrate this point:

 

81321-wrp.png

 

'lt' means less than in this case. I find the following chart here where it says 'filter' very useful (from docs.microsoft.com) - I will also place a part of the chart inline below in case:

 

81321-wrp2.png

 

lt means less than, le means less than or equal to, gt means greater than, ge means greater than or equal to, eq means equal to, ne means not equal to.

 

In Power Automate, the 'value' part on the right side should always be surrounded by single quotes. The value does not have to be an expression - but if it is, the expression must be surrounded by single quotes, where these single quotes are actually outside of that expression. If the value is not an expression, the value on right side should still be surrounded by single quotes anyway even if it is not an expression.

 

Yes, the expression must be surrounded in single quotes - these particular single quotes being placed outside the expression and surrounding it.

 

The left side (i.e. the Column name in SharePoint for example), on the other hand, should actually not be surrounded by single quotes. Please note that sometimes the column name is not the same as what is seen, sometimes it contains strange things like __x0020__ especially if the original column name had any characters such as space characters, etc. and the true column name may need to be found out by inspecting test SharePoint OData API responses (sometimes they should be issued outside of Power Automate to determine the real column names to filter by) - keep that in mind too.

 

Check if the above helps as well as a reference of the key point without necessarily having to check the video directly. I did leave this part out before as I was replying quickly and wondered if it might have been enough as a starting point. However now that you mention it, this information may be helpful to have directly spelled out if someone comes across this post, so I include it here now in case.

 

 

Vgandi
Regular Visitor

@poweractivate Thank you for the detailed explanation and sharing some resource links. Highly appreciate you contribution.

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (3,310)