web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / save draft vs submit f...
Power Apps
Answered

save draft vs submit form button with some fields required.

(0) ShareShare
ReportReport
Posted on by 79

Hi all,

 

I have a form with Data cards set as Required = True, and a submit button that is visable if the form is valid (all cards filled). If the form was successfully completed, and the submit button clicked, I had SubmitForm(Form); Navigate(ScreenSuccess)

 

This worked fine.

 

I wanted to add a "save draft" option, I followed Rezas video on how to do this here https://www.youtube.com/watch?v=y24AkK-OXy0.

 

My problem is that when the Submit button is clicked, the form always navigates to ScreenSuccess and the user doesn't see the required fields messages.

 

I can't work out from Reza's video how to do the navigation - e.g. navigate to ScreenSuccess if saved as draft, and stop navigation if the form is not complete (e.g. hide the submit button or whatever).

Seems like it should be pretty basic and I'm missing something. How can I do this?

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @sossie07 

    There should never be anything chained after SubmitForm() for the reasons you gave for the problem you are having.  Any further commands should be put in the OnSuccess property of the form being submitted so that they are not executed unless the form is successfully submitted.  

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @sossie07 

    @Drrickryp is 100% correct!  You should have nothing but SubmitForm as your function.  Everything else should be handled in the OnSuccess or OnFailure actions of the form.

     

    To add though, in your case, you can simply look at whatever column you are storing your draft status in and then navigate if needed.

     

    Example formula in your OnSuccess action:

    If(
     !(Self.LastSubmit.Status.Value="Draft"),
     Navigate(yourScreen)
    )

     This would navigate if the status is NOT Draft.

     

    I hope this is helpful for you.

  • sossie07 Profile Picture
    79 on at

    Thanks for the responses, that is working.

     

    One other question if you could help....

    Previously I had the submit button displaymode set depending on all the Datacards being required and the form valid. But with Reza's example the the required property of each datacard is set depending on what button is clicked. Is there a way I can change the display mode of the submit button so its only in edit mode if the required fields are filled?

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard