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 restrict change...
Power Apps
Answered

How to restrict change of value of choice field based on Form Mode

(0) ShareShare
ReportReport
Posted on by 13

In PowerApp form, I have a dropdown named 'Status' with 3 options ('Created', 'In-progress', 'Closed'). I want to show only 'Created' option when the FormMode=New. In case of FormMode = Edit, the remaining 2 options should be listed.

 I want the user to see only the "Created" option from in FormMode=New. In case of Edit mode, he should be able to select between "In-Progress" and "Closed". Can we tweek the code a little more to achive that ?

 

My query is in continuation to the solved problem described here: https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-restrict-change-of-value-of-choice-field-based-on/m-p/2428634#M605477

 

Categories:
  • Verified answer
    Sickle-Cell Profile Picture
    600 Super User 2024 Season 1 on at

    Hi, try this.

     

    If(EditForm1.Mode= FormMode.New,
    Filter(
     Choices(LISTNAME.CHOICECOLUMNANME),
     Value = "Created"
     ),
    Switch(
     //Adjust choice column name & list names below
     ThisItem.CHOICECOLUMNANME.Value,
     "Closed",
     //Only closed should be available
     Filter(
     Choices(LISTNAME.CHOICECOLUMNANME),
     Value = "Closed"
     ),
     "In-Progress",
     //Created should no longer be available
     Filter(
     Choices(LISTNAME.CHOICECOLUMNANME),
     Value <> "Created"
     ),
     //Display all options when the value is blank or equal to Created
     Choices(LISTNAME.CHOICECOLUMNANME)
    ))
  • debobratamukher Profile Picture
    13 on at

    Thank you soo 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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard