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 : G8sZZam2WWJ6lMTYaNykoB
Power Apps - Building Power Apps
Unanswered

Enable / disable text input based on condition

Like (0) ShareShare
ReportReport
Posted on 5 May 2023 23:37:55 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

I have the same question (0)
  • jayBEEph Profile Picture
    29 on 06 May 2023 at 06:12:46
    Re: Enable / disable text input based on condition

    ok thanks

  • WarrenBelz Profile Picture
    149,445 Most Valuable Professional on 06 May 2023 at 05:01:16
    Re: Enable / disable text input based on condition

    @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 06 May 2023 at 03:26:22
    Re: Enable / disable text input based on condition

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

  • WarrenBelz Profile Picture
    149,445 Most Valuable Professional on 06 May 2023 at 03:14:28
    Re: Enable / disable text input based on condition

    @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 06 May 2023 at 03:04:11
    Re: Enable / disable text input based on condition

    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
    149,445 Most Valuable Professional on 06 May 2023 at 02:45:14
    Re: Enable / disable text input based on condition

    @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 06 May 2023 at 02:21:42
    Re: Enable / disable text input based on condition

    It is a Yes/No datatype

  • WarrenBelz Profile Picture
    149,445 Most Valuable Professional on 06 May 2023 at 02:17:11
    Re: Enable / disable text input based on condition

    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

     

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!

Loading complete