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 / Enable / disable text ...
Power Apps
Unanswered

Enable / disable text input based on condition

(0) ShareShare
ReportReport
Posted on by 29

Assuming my gallery item is:

Sort(Filter(spTagLearners, sp_teacherID = varSelectedID), tagLearnerID)

I have 4 text inputs - txtA, txtB, txtC, txtD

 

If my yes/no column A has a value of yes how can I disable txtA? and same goes to values of other columns to other text inputs?

any suggestions? thanks in advance

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

    Hi @jayBEEph ,

    Assuming you mean this is a Text column with values of "Yes" and "No", the DisplayMode of the Text control would be (if this was a Boolean column, you would not be using a Text control)

    If(
     Self.Text = "Yes",
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • jayBEEph Profile Picture
    29 on at

    It is a Yes/No datatype

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @jayBEEph ,

    So how are you using a Text control to display it, or is this a separate field in that control ? If so

    If(
     ThisItem.ColumnA,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • jayBEEph Profile Picture
    29 on at

    Pardon my English, I will just rephrase it maybe I was not able to express it correctly.


    My SharePoint list has Yes/No columns called A, B, C, D 

    Let's say my gallery list is Sort(Filter(spTagLearners, sp_teacherID = varSelectedID), tagLearnerID)
    The gallery contains 4 text inputs txtA, txtB and so on, there aren't any checkboxes to display values from columns A,B,C,D

    What I want to achieve is:

     

    every time the gallery is loaded the text inputs will either be displayed in edit or disabled based on the values in the columns A, B, C, D depending on each rows values. So If chkA is Yes then txtA is disabled. 


  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @jayBEEph ,

    That is what I assumed in my last post, so on the TextA control DisplayMode.

    If(
     ThisItem.chkA,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • jayBEEph Profile Picture
    29 on at

    yes, this works but it disables all txtA, it does not disable a specific row where chkA is YES

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @jayBEEph ,

    That is exactly what it should do - if the chkA field in the record is true, it will disable the txtA control in the gallery row containing that record.

  • jayBEEph Profile Picture
    29 on at

    ok thanks

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