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 / Disable button (Displa...
Power Apps
Unanswered

Disable button (DisplayMode) when collection contains a certain text

(0) ShareShare
ReportReport
Posted on by 2

Hi all,

 

My Powerapps contains a dropdown with three items to choose from, let's call them:

Line 1

Line 2

Line 3

 

I use a Collection (named: Collection1) to store the data temporary (column named: "CLine") until the user clicks the send E-mail button. However I would like to disable the button with the DisplayMode when column "CLine" contains the text value ''Line 2." I assumed the following formula would work, but it doesn't:

 

If(Collection1.ColumnLine = "Line 1"; DisplayMode.Disabled; DisplayMode.Edit)

 

If anyone knows a solution I would love to hear it. Thank you!

 

Kind Regards,

Folk

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,420 Most Valuable Professional on at

    Hi @Folk ,

    Try

    If(
     Collection1.ColumnLine = "Line 1" ||
     Collection1.ColumnLine = "Line 2" ||
     Collection1.ColumnLine = "Line 3";
     DisplayMode.Disabled; 
     DisplayMode.Edit
    )

    There are other solutions if you have more lines, but need a non-Delegable filter.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Folk Profile Picture
    2 on at

    Hi @WarrenBelz Thank you for the proposed solution. Unfortunately it does not work. PowerApps determines the operator "=" as an invalid argument.

  • WarrenBelz Profile Picture
    155,420 Most Valuable Professional on at

    Hi @Folk ,

    I was simply using your syntax and expanding it to the three possibilities. I cannot see either your data structure of controls and it is far more helpful to give actual code than abstract references.

    You refer to a drop-down having values, but then a column to reference? I am now actually unclear on what you want - how is the drop-down related to cLine? 

     

     

     

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 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard