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 / How to disable a textb...
Power Apps
Answered

How to disable a textbox if a selection is made from another dropdown box.

(0) ShareShare
ReportReport
Posted on by 104

Hi All,

 

I would like to hide a DataCardValue textbox if a user makes a particular selection from another dropdown textbox.  The dropdown textbox is linked to a SharePoint list column. The SharePoint list is called 'Users Details' and the column is called 'User Type'. If the user selects Student from the dropdown box the next DataCardValue textbox is disabled or hidden. I hope this makes sense.

 

I have tried the code below in the Visible properties of the DataCardValue textbox, but I get an error.

 

If(
CountRows(
Filter(
'Users Details',
Upper('User Type') = 'Student'
))
= 0,
DataCardValue3,DisplayMode.Disabled,
DataCardValue3,DisplayMode.Enable
)

 

I hope you can help

PowerStar321

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @PowerStar321 

    You would put it in the Display mode property of the control.

  • Verified answer
    v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @PowerStar321 ,

    You can set the Visible properties of the DataCardValue3 textbox to below formula(replace DataCardValue2 to your dropdown name):

    If(DataCardValue2.Selected.Value="Student",false,true)

    Best regards,

    Allen

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard