cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Editing an already submitted form

Hi everyone,

 

After a user submits a form, if they have made a mistake they can go to the form and click the edit button, on the edit buttons OnSelect I have this:

 

 

Set(varModeEdit,!varModeEdit)

 

 

This works fine, but I have set it so it can't be edited if the form has passed the first approval.

 This too works fine.

 

But I've noticed a backdoor in my code, if a user goes to another form they have submitted and clicks the edit button and then goes back to the gallery and clicks the already approved form, this already approved form appears in edit mode... and I want the variable to reset when a user selects an item from the gallery, or when they navigate to my SucessScreen

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Editing an already submitted form

If your form has a a datacaradvalue with the Approval, you can use the displaymode of the form.

In the Default mode put;

If(datacaradvalue4="Approved",FormMode.View,FormMode.Edit)

 

This way even if the use selects the Gallery, it cannot be edited.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Editing an already submitted form

If your form has a a datacaradvalue with the Approval, you can use the displaymode of the form.

In the Default mode put;

If(datacaradvalue4="Approved",FormMode.View,FormMode.Edit)

 

This way even if the use selects the Gallery, it cannot be edited.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: Editing an already submitted form

@eka24  Aha, that's a good shout and something I can use for sure.
I normally have a notify message appear on screen when a user selects the button and the form is already approved.

 

I've just tested this too, on my GalleryScreen OnVisible i set it to Set(varModeEdit, false)

This seems to work, when i navigate from the gallery, do you see any flaws with this approach? 

Highlighted
Super User
Super User

Re: Editing an already submitted form

If it works fine but how does this disable the edit of the form when Approved is selected in the Gallery

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,629)