cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Issue creating flow

Hi,

I want to create a flow that if a sharepoint item is not modified for 2-3 days, an email will be sent to the user.

 

 I have a SharePoint list where we have columns as state, Owner, waiting for, modified date etc. My issue is first condition (to check for state value) is not working/not getting any state value ( closed, open, waiting for approval, rejected etc) and in the second condition where i used the expression  that if "modified date < addDays(utcNow(), -2)" 

is not working. 

 

Can someone please help me out

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Issue creating flow

Hi @Anonymous,

 

When comparing two date, please make sure they have the same format.

Dynamic content Modified will return a date time likes below:

2018-09-26T06:42:18Z

While function adddays(utcnow(),-2) will return a date time with following format:

2018-09-24T07:01:29.4716815Z

So the condition won’t work in your flow.

Please input the following code in the Condition in Advanced mode:

@equals(formatDateTime(items('Apply_to_each')?['Modified'], 'yyyy-MM-dd'),formatDateTime(adddays(utcnow(),-2),'yyyy-MM-dd'))

1.PNG

Hope it could be your reference. 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Super User
Super User

Re: Issue creating flow

@Anonymous:

I suspect that your status column is a choice column.  If so, the condition comparison is case sensitive - check to make sure the case and spelling in the conditions matches the column.

 

Also, you are better off using a filter in get items rather than using a condition.  By default, Get Items returns only 100 items. Here is a link to a blog I wrote that explains how to change the default. The max is 500 items for most Flow plans.

 

If you want to use a filter, here is how it should look:

ChoiceFilter.jpg 

 

Scott

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

10 REPLIES 10
Super User
Super User

Re: Issue creating flow

@Anonymous:

 

Can you post a screen shot of your Flow - that will make it much easier to assist.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Anonymous
Not applicable

Re: Issue creating flow

Hi @ScottShearer,

Thank you for the response. Here are some screenshots of the flow i tried to create.

 

1.png

 

2.png

 

Below are the state values that we added in the Sharepoint items
3.PNG

 

Community Support Team
Community Support Team

Re: Issue creating flow

Hi @Anonymous,

 

When comparing two date, please make sure they have the same format.

Dynamic content Modified will return a date time likes below:

2018-09-26T06:42:18Z

While function adddays(utcnow(),-2) will return a date time with following format:

2018-09-24T07:01:29.4716815Z

So the condition won’t work in your flow.

Please input the following code in the Condition in Advanced mode:

@equals(formatDateTime(items('Apply_to_each')?['Modified'], 'yyyy-MM-dd'),formatDateTime(adddays(utcnow(),-2),'yyyy-MM-dd'))

1.PNG

Hope it could be your reference. 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Re: Issue creating flow

Hi @v-yamao-msft ,

Thanks for the reply. I will try to use the logic what you told and will let you know if it works. 

 

Meantime, on the first condition, its not getting the status values... The first condition picks all the Items apart from status value ( closed, open, verified etc). How can i add the condition to only pick the items that are not closed?

 

 

Thanks!

Azeem

Super User
Super User

Re: Issue creating flow

@Anonymous:

I suspect that your status column is a choice column.  If so, the condition comparison is case sensitive - check to make sure the case and spelling in the conditions matches the column.

 

Also, you are better off using a filter in get items rather than using a condition.  By default, Get Items returns only 100 items. Here is a link to a blog I wrote that explains how to change the default. The max is 500 items for most Flow plans.

 

If you want to use a filter, here is how it should look:

ChoiceFilter.jpg 

 

Scott

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Anonymous
Not applicable

Re: Issue creating flow

Hi @ScottShearer,

 

Thank for the reply. Changing the pagination value is awesome and i already had it configured on my get item action.


Secondly, the reason i choose a condition to get the state value is only because i want all the items except that are closed. Below is the choices i have i state value.

 

3.PNG

 

i tried the condition as case sensitive but it didn't worked as well... May be i can try something different to get all the items except the one closed.

@v-yamao-msft the modified advance function is working. Thanks for the help champ!

if i get the state value in my first condition working, it will be sweet as heaven.

 

 

/Azeem

Community Support Team
Community Support Team

Re: Issue creating flow

Hi @Anonymous,

 

Thanks for updating and I am glad to hear that it works for you.

About your first condition, from the screenshot, it seems that you have many choices for the State column, and the choice value Closed is configured as “6. Closed”. So in your first condition, please try to change it as State Value is not equal to 6. Closed.

Please take a try with it.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Issue creating flow

@Anonymous:

 

The filter expression I showed above will limit the items returned to those not closed - I used ne which equates to not equal.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Anonymous
Not applicable

Re: Issue creating flow

Thanks @ScottShearer it really worked. 

i also tried to add below query in Advance condition but no luck. Could you tell me what i am missing in there?

 

@or(not(equals(items('Apply_to_each')?['State']?['Value'], 'X. Closed')),not(equals(items('Apply_to_each')?['State']?['Value'], 'X. Rejected')),not(equals(items('Apply_to_each')?['State']?['Value'], 'X. Superseeded')))

i thought of adding 'OR'statement and filter result further.

 

/Azeem

Anonymous
Not applicable

Re: Issue creating flow

Hi @ScottShearer and @v-yamao-msft,

 

Both of your solution worked and now my Flow is working as charm... Thanks alot guys... Million Kudos 😉

 

 

/Azeem

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,469)