cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stapes
Impactful Individual
Impactful Individual

Help needed with this statement. Filter with !IsBlank.

In this example, if the collection has no quantities outstanding (Qty-OS) and all rows have a PDN number (a value that looks like "PDN123456", I want to disable a button.

This is my code behind the DisplayMode property:

 

 

 

If(
    gblPdnLock = true || (CountRows(
        Filter(
            colControlSheet,
            QtyOS = 0
        )
    ) = CountRows(colControlSheet) && CountRows(
        Filter(
            colControlSheet,
            !!IsBlank('PDN-No')
        )
    ) = CountRows(colControlSheet) && CountRows(
        Filter(
            colControlSheet,
            StartsWith('PDN-No',"PDN")
        )
    ) = CountRows(colControlSheet)),
    DisplayMode.Disabled,
    DisplayMode.Edit
)

 

 

This bit is returning a 0 and it should be a 1. There is a row with a non-blank value.

 

 

CountRows(
        Filter(
            colControlSheet,
            !!IsBlank('PDN-No')
        )

 

 

Obviously, this statement is not coded correctly.

Can anybody help?

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks @JR-BejeweledOne  - I actually solved this problem moments after posting. Unfortunately there is no method of deleting my question.

This was the solution:

CountRows(
        Filter(
            colControlSheet,
            'PDN-No' <> ""
        )

View solution in original post

3 REPLIES 3
JR-BejeweledOne
Super User
Super User

Try removing the extra ! in front of Is Blank



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Thanks @JR-BejeweledOne  - I actually solved this problem moments after posting. Unfortunately there is no method of deleting my question.

This was the solution:

CountRows(
        Filter(
            colControlSheet,
            'PDN-No' <> ""
        )
JR-BejeweledOne
Super User
Super User

For future reference if you solve your own question.   Post another reply with the answer and mark you own reply as the solution.  This will help others who may run into similar issues.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,092)