cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

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
Community Support

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
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (15,314)