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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / display mode if isblan...
Power Apps
Answered

display mode if isblank not working

(0) ShareShare
ReportReport
Posted on by 129

Good afternoon, i've a button in my app that will send a letter to a customer however i'm wanting the button to be greyed out if we don't have all the information in.

 

the information is all stored in dataverse and i select the record from the nov_sel_gallery. this is the code i am using but regardless of whether the fields are empty it just shows the button as active.

 

I suspect i may need to check if the text boxes in the app are empty instead but that won't work for me as it requires the user to remember to press the save button when they have updates the boxes and as we all know users are not always reliable.

 

If(
IsBlank(nov_sel_gal.Selected.comp_name_out || nov_sel_gal.Selected.comp_add_out || nov_sel_gal.Selected.comp_add_out_2 || nov_sel_gal.Selected.comp_add_out_3 || nov_sel_gal.Selected.comp_add_out_4 || nov_sel_gal.Selected.comp_reg_out || nov_sel_gal.Selected.q_ref || nov_sel_gal.Selected.comp_name_in || nov_sel_gal.Selected.comp_reg_in || nov_sel_gal.Selected.cust_cont_email || nov_sel_gal.Selected.comp_add_in || nov_sel_gal.Selected.comp_add_in_2 || nov_sel_gal.Selected.comp_add_in_3 || nov_sel_gal.Selected.comp_add_in_4 || nov_sel_gal.Selected.acc_man || nov_sel_gal.Selected.acc_man_position || nov_sel_gal.Selected.m_ticket_ref),
DisplayMode.Disabled,DisplayMode.Edit
)

 

Thanks in advance and please let me know if you need any other information.

 

Alastair

Categories:
I have the same question (0)
  • Verified answer
    Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @Alastairs   

     

    The issue is with your IsBlank function. The IsBlank function checks if a single value is blank or contains empty text. When you use the || operator inside IsBlank, it's trying to evaluate the entire expression as a single value, which is not what you want.

     

    Instead, you should use IsBlank separately for each field and combine them with the || operator outside of the IsBlank function. This way, if any of the fields is blank, the entire expression will be true and the button will be disabled.

     

    Try this formula,

     

    If(
     IsBlank(nov_sel_gal.Selected.comp_name_out) || 
     IsBlank(nov_sel_gal.Selected.comp_add_out) || 
     IsBlank(nov_sel_gal.Selected.comp_add_out_2) || 
     IsBlank(nov_sel_gal.Selected.comp_add_out_3) || 
     IsBlank(nov_sel_gal.Selected.comp_add_out_4) || 
     IsBlank(nov_sel_gal.Selected.comp_reg_out) || 
     IsBlank(nov_sel_gal.Selected.q_ref) || 
     IsBlank(nov_sel_gal.Selected.comp_name_in) || 
     IsBlank(nov_sel_gal.Selected.comp_reg_in) || 
     IsBlank(nov_sel_gal.Selected.cust_cont_email) || 
     IsBlank(nov_sel_gal.Selected.comp_add_in) || 
     IsBlank(nov_sel_gal.Selected.comp_add_in_2) || 
     IsBlank(nov_sel_gal.Selected.comp_add_in_3) || 
     IsBlank(nov_sel_gal.Selected.comp_add_in_4) || 
     IsBlank(nov_sel_gal.Selected.acc_man) || 
     IsBlank(nov_sel_gal.Selected.acc_man_position) || 
     IsBlank(nov_sel_gal.Selected.m_ticket_ref),
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

     

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • Alastairs Profile Picture
    129 on at

    Many thanks, that's worked perfect

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard