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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Is blank on multiple c...
Power Apps
Answered

Is blank on multiple condtions - simple syntax query

(0) ShareShare
ReportReport
Posted on 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)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @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)
     )
    )

     

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    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 at

    @vffdd 

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

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    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

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @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 at

    Yep that works.  Thank you 🙂

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard