cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gmaasz
Resolver I
Resolver I

Change default display of form using variable

I have an 'Edit' form with DefaultMode set to 'View', which I want to change to 'Edit' by clicking a button. I tried to use a variable and set the variable to Displaymode.View and DisplayMode.Edit when clicked, but it gives to following error:

 

The property expects Enum values, but this rule produces incompatible Text Values.

1 ACCEPTED SOLUTION

Accepted Solutions
gmaasz
Resolver I
Resolver I

So I went and used the FormMode function instead of the Displaymode function and set it with a variable.

View solution in original post

3 REPLIES 3
RandyHayes
Super User III
Super User III

@gmaasz 

 

You could simply use the EditForm function to put your form into Edit mode. 

On the OnSelect of your button, place this formula:  EditForm(yourFormName)

 

I hope that is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
gmaasz
Resolver I
Resolver I

So I went and used the FormMode function instead of the Displaymode function and set it with a variable.

View solution in original post

Yep, as you say "Keep it Super Simple"! 

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,048)