cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lucian
Resolver I
Resolver I

Condition is not evaluated correctly for a numeric SharePoint calculated column

Hello,

 

I have a flow that should export some information into an Excel file depending on a numeric SharePoint calculated column.

Basically that column will evaluate some records and if the record is considered "valid" will return 1 and if the record is considered invalid will return 0.

 

 Cond1.png

 

But this evaluation will always evaluate to false.

I have tried to put the 1 as '1' no luck.

 

The strange thing is that I have another flow, using the same logic where that condition is evaluated correctly.

When I have copied the condition from the other flow it evaluates correctly - WHY?... because is the same field compared to the same type of value.

 

Cond2.png

 

I have recreated the same Apply to each loop but with initial condition card is never evaluates to true, but with the copied condition card is evaluating correctly.

I have lost about 2 hours trying to understand WHY... but I cannot find any reason. Is there any "logical reason" I should take care of in the future?

Unfortunately for the condition cards and loops you cannot "peek code" so maybe there I would find some reasons...

 

Also after 2 hours of digging I found another workaround: MS Flow - condition wrongly evaluates on calculated column but it seems to much "work" to use that compose action before condition.

 

Is there anything am I missing?

 

Kind Regards,

Lucian

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @Lucian,

 

Can you replace the InregistrateValida field by the following expression. This will use an int function to convert the calculated column value from 1.0000000 to 1. With this workaround your condition should be evaluated as true.

 

int(items('Apply_to_each')?['InregistrareValida'])

 

expression_calculatedcolumn.png

View solution in original post

3 REPLIES 3
Expiscornovus
Dual Super User
Dual Super User

Hi @Lucian,

 

Can you replace the InregistrateValida field by the following expression. This will use an int function to convert the calculated column value from 1.0000000 to 1. With this workaround your condition should be evaluated as true.

 

int(items('Apply_to_each')?['InregistrareValida'])

 

expression_calculatedcolumn.png

Lucian
Resolver I
Resolver I

Hi @Expiscornovus ,

 

Thank you for your suggestion which is better than another card with compose, but why in the same condition created manually into a flow does work without any other tricks, and in a new flow this would no longer work?

 

Kind Regards,

Lucian

Expiscornovus
Dual Super User
Dual Super User

Hi @Lucian,

 

From experience I know sometimes the calculated columns don't render properly (showing up as a float instead of an integer). But I don't know what the root cause of this is. 

 

If you do want to know you might be able to contact Microsoft Support about this via a service request. They might be able to investigate the root cause in the SharePoint connector.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,157)