cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyberco01
Level 8

Single form for New and Edit

I have a single Powerapps Sharepoint form. I want all fields to enabled in New mode and few fields to be read-only in edit mode ( as it can be editted by creator or other team). Also, one section needs to be visible only to a few group of people.

 

Kindly help. Please do let me know if any more information is available

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Single form for New and Edit

Hi @cyberco01 

I do that all the time.  I generally don't like to clutter up my apps with unnecessary screens even though it is easy to duplicate a screen and change the Navigation. Put

If(EditForm1.Mode=FormMode.New,Edit,View)

in the DisplayMode property of the card you wish to disable.  You can easily copy this formula into the DisplayMode property of any other cards you wish to disable.

In the example, the name of the form is EditForm1, The formula is put in the DisplayMode property of the Product Name card.  The result is shown in the two screenshots below.Screenshot_3.pngEditForm1 in Edit mode, Product name disabled

 

Screenshot_4.pngEditForm1 in New mode, Product Name editable

 

 

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Single form for New and Edit

The obvious answer for this is to create two forms, one for new records and one for editing existing records.  Trying to do both on a single form will be very complex and prone to error.  When navigating from an existing record use the edit screen, when creating a new record use the new screen.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Super User
Super User

Re: Single form for New and Edit

Hi @cyberco01 

I do that all the time.  I generally don't like to clutter up my apps with unnecessary screens even though it is easy to duplicate a screen and change the Navigation. Put

If(EditForm1.Mode=FormMode.New,Edit,View)

in the DisplayMode property of the card you wish to disable.  You can easily copy this formula into the DisplayMode property of any other cards you wish to disable.

In the example, the name of the form is EditForm1, The formula is put in the DisplayMode property of the Product Name card.  The result is shown in the two screenshots below.Screenshot_3.pngEditForm1 in Edit mode, Product name disabled

 

Screenshot_4.pngEditForm1 in New mode, Product Name editable

 

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 191 members 5,074 guests
Recent signins:
Please welcome our newest community members: