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 / Trying to disable all ...
Power Apps
Answered

Trying to disable all fields using Form DisplayMode

(0) ShareShare
ReportReport
Posted on by 289

Hi Guys,

When a user recalls one of their requests and the status is "To be submitted", I would like to allow them to edit any field. If the status is anything else I would like to disable all fields.

In the form DefaultMode property, I have put:

If(varStatus="To be submitted",FormMode.Edit,FormMode.View)

When I change this while the form is open the fields disable as expected, but as soon as I go back and navigate to the form again all of the fields are editable.

The DisplayMode property of all of my fields is Parent.DisplayMode

What am I doing wrong?

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Your default mode code looks ok. Show all the code related to varStatus

  • JimJim Profile Picture
    289 on at

    When a user selects an item in a gallery, the following code assigns a value to the variable

    Set(varStatus,LookUp('Requests', ID = gal_ViewRequests.Selected.ID).Status)

    I have shown the value of varStatus in a label and it look fine

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @JimJim 

     

    Set the OnSelect property of gallery to

    If(
     ThisItem.Status.Value = "To Be Submitted",
     EditForm(EditForm1),
     ViewForm(EditForm1)
    );
    Navigate(
     EditScreen1,
     ScreenTransition.None
    )

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    StalinPonnusamy_0-1631285544094.png

     

  • JimJim Profile Picture
    289 on at

    Thank you so much 😀

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard