Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ba9uGnhtFcrn7HH58Hd5Dc
Power Apps - Building Power Apps
Answered

How to make field editable and non editable

Like (0) ShareShare
ReportReport
Posted on 5 Aug 2020 08:57:40 by 10

Hi Guys,

 

I am having the three fields say as dropdown field as (dropdown1) and TextInuput as (TextInput1) and label as (label1) ,when I select any values from the dropdown1 ,the other two fields TextInput1 and Label1 Should Change the display mode as "Edit" to "View. 

 

And I will have Another button as (Button1) When I click the Button1, the  TextInput1 and Label1 should be again changed to edit mode.

  • Verified answer
    eka24 Profile Picture
    20,921 on 05 Aug 2020 at 11:24:33
    Re: How to make field editable and non editable

    It should be:

    UpdateContext ({varMode:true})

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 05 Aug 2020 at 11:19:42
    Re: How to make field editable and non editable
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on 05 Aug 2020 at 11:19:07
    Re: How to make field editable and non editable

    Colon not coma

  • Adam123 Profile Picture
    10 on 05 Aug 2020 at 11:06:40
    Re: How to make field editable and non editable

    Jenifer_0-1596625539399.png

    I am getting error like this.

  • Verified answer
    eka24 Profile Picture
    20,921 on 05 Aug 2020 at 09:40:22
    Re: How to make field editable and non editable

    Try this: 

    1.Set the AllowEmptySelection of the dropdown to true

     

    2. In the DisplayMode of the label and the Textbox put:

    If(Dropdown1.Selected.Value="", DisplayMode.Edit, DisplayMode.View)

     

    Am wondering why you need another button because if the dropdown is blank Automatically the mode Will change

     

    But if you still need it

    3. Insert a button to change the displaymode:

    UpdateContext ({varMode,true})

     

    The change the displaymode formula to;

    If(Dropdown1.Selected.Value="" || varMode=true, DisplayMode.Edit, DisplayMode.View)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started