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

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

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard