web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : I/lxWrJnDfzDaMfiWcLFgs
Power Apps - Building Power Apps
Answered

Is blank on multiple condtions - simple syntax query

Like (0) ShareShare
ReportReport
Posted on 14 Jun 2022 14:34:31 by 1,257 Super User 2024 Season 1

I know this is just a simple syntax but just can't get the right order !

 

Trying to disable a button if a text box is empty AND a collection is empty.  No errors but it only works one or the other. So if I put something in the text box and not in collection or vv it switches to edit mode.   Here's what I've tried

 

If(IsBlank(txt_landing_pushnotificationtext) && IsEmpty(coTest),DisplayMode.Disabled,Edit)

If(IsBlank(txt_landing_pushnotificationtext) AND IsEmpty(coTest),DisplayMode.Disabled,Edit)

If(IsBlank(txt_landing_pushnotificationtext) && IsBlank(coTest),DisplayMode.Disabled,Edit)
If(IsBlank(txt_landing_pushnotificationtext) AND IsBlank(coTest),DisplayMode.Disabled,Edit)

 

I know someone will look at this and see exactly what I'm doing wrong but it ain't me ! 🙂

 

TIA

 

Categories:
I have the same question (0)
  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on 17 Jun 2022 at 08:11:25
    Re: Is blank on multiple condtions - simple syntax query

    Yep that works.  Thank you 🙂

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on 15 Jun 2022 at 14:37:45
    Re: Is blank on multiple condtions - simple syntax query

    @vffdd 

    If you are evaluating a collection, IsEmpty() is sufficient, perhaps this is the reason it didn't work.  I switched the logic in the formula below?   

     

    With({blnk:!IsBlank(txt_landing_pushnotificationtext),
     emp:!IsEmpty(coTest)
     },
     If(blnk&&emp, DisplayMode.Edit, //Edit enabled only if there is data in 
     DisplayMode.Disabled) // the textinput and the collection 
     )
    )

     

      

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on 15 Jun 2022 at 11:29:00
    Re: Is blank on multiple condtions - simple syntax query

    unfortunately doesn't work @Drrickryp  as soon as I type in the text box (collection still emtpy) button becomes enabled same result as my options above

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 15 Jun 2022 at 11:02:01
    Re: Is blank on multiple condtions - simple syntax query

    @vffdd 

    They are temporary variables. Think of them as aliases for your formulas.

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on 15 Jun 2022 at 09:53:46
    Re: Is blank on multiple condtions - simple syntax query

    thanks @Drrickryp  ok that wasn't what I was expecting !🤣  Have never used with before..  what is the blnk and emp?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 14 Jun 2022 at 14:41:16
    Re: Is blank on multiple condtions - simple syntax query

    @vffdd 

    The following will have display mode disabled if txt_landing is blank and  cotest is either blank or empty.

     

    With({blnk:IsBlank(txt_landing_pushnotificationtext),
     emp:IsEmpty(coTest)||IsBlank(coTest)
     },
     If(blnk&&emp, DisplayMode.Disabled,
     DisplayMode.Edit)
     )
    )

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473