cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iwonder
Responsive Resident
Responsive Resident

IF with CountRows not working

I have the following If Statement that fails.

 

If(
CountRows(
Filter(
colPelletRecords,
Facility = SelectedFacility.Text,
Line = SelectedLine.Text
)
) = 0,

Notify("What the heck"),//Other stuff)

 

The True part of the statement is fired every time even though the CountRows() = 1. I put the CountRows part as the Text parameter of a label and it's showing 1.

 

Why does the False part not get triggered in the IF statement?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
iwonder
Responsive Resident
Responsive Resident

After a lot of time trying to figure this out I realized my problem is higher up... the code posted works as expected.

 

Thanks

View solution in original post

3 REPLIES 3
iwonder
Responsive Resident
Responsive Resident

After a lot of time trying to figure this out I realized my problem is higher up... the code posted works as expected.

 

Thanks

View solution in original post

KroonOfficeSol
Resident Rockstar
Resident Rockstar

Just to make your app perform faster use First() around your filter formula. Only need to know if there is at least one match right 😉

 

And use IsEmpty() instead of CountRows().

Thank you SO MUCH for the pointers!!!

 

have a great day

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (53,273)