cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmistry
Level 8

Flow returning expression result false in below scenario

Hi,

I have a below SharePoint list for which I am trying to build a simple flow based on following condition.

When the comp credit expiration date field value is today's date and Comp Credit Status value equals to Pending then, I would like to set the Comp Credit Status value to "Expired".

 

Please note that the Comp Credit  expiration date is a date field and Comp Credit Status value is a free text column (it actually comes from another list's calculcated column using a different flow).

Capture.PNGI added a flow as below and it runs successfully but for some reason I am always seeing the expression result as false. I manually set the Comp Credit expiration date to 9/27 (in the list for testing) to match today's date but still it says expression result as false. Maybe I am doing a stupid mistake here but can someone please help me fix this.

Capture.PNGCapture.PNG

I tried the equals instead of lessOrEquals for the first part of condition but still no luck. Please help. Again the logic is if the date matches utcnow and status eqauls pending then set the status field to expired.

P.S. I tried Contains as well for the status field since its a free text but still same issue. THanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow returning expression result false in below scenario

Hi @dmistry,

 

Do you want to filter items that Credit expiration date is equals to Today’s date and Credit status equals to Pending then update the Credit status to Expired?

What’s the column type of Comp Credit status? Is it a Text column or Choice column?

What’s the date format that displayed on Flow? Please add a Compose action to get the correct date format in flow, is it “MM/dd/yyyy” or “dd/MM/yyyy”?

I have made the following test. In the list, Credit Expiration is Date column with format “MM/dd/yyyy”, and Credit status is of Text type.

The condition is configured likes below:

@and(equals(items('Apply_to_each')?['ExpirationDate'], utcnow('yyyy-MM-dd')),equals(items('Apply_to_each')?['CreditStatus'],'Pending'))

Note: Please make sure the column names are correct, and the comparing two dates should have the same format.

As you can see, the return format of column Expiration date is “yyyy-MM-dd”, so I configured utcnow with the same format.

2.PNG1.PNG3.PNG

It works fine. Please take it for a reference and try again with it on your side.

 

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

1 REPLY 1
Community Support Team
Community Support Team

Re: Flow returning expression result false in below scenario

Hi @dmistry,

 

Do you want to filter items that Credit expiration date is equals to Today’s date and Credit status equals to Pending then update the Credit status to Expired?

What’s the column type of Comp Credit status? Is it a Text column or Choice column?

What’s the date format that displayed on Flow? Please add a Compose action to get the correct date format in flow, is it “MM/dd/yyyy” or “dd/MM/yyyy”?

I have made the following test. In the list, Credit Expiration is Date column with format “MM/dd/yyyy”, and Credit status is of Text type.

The condition is configured likes below:

@and(equals(items('Apply_to_each')?['ExpirationDate'], utcnow('yyyy-MM-dd')),equals(items('Apply_to_each')?['CreditStatus'],'Pending'))

Note: Please make sure the column names are correct, and the comparing two dates should have the same format.

As you can see, the return format of column Expiration date is “yyyy-MM-dd”, so I configured utcnow with the same format.

2.PNG1.PNG3.PNG

It works fine. Please take it for a reference and try again with it on your side.

 

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

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,542)