cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Super User
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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 52 members 3,359 guests
Please welcome our newest community members: