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 / How to "Save as Draft"...
Power Apps
Unanswered

How to "Save as Draft" with required fields empty

(0) ShareShare
ReportReport
Posted on by

We have a form that has a lot of fields( can be up to 100 depending on selections made), and many of those fields are required. There are times that when a user is entering a form they don't have all the required information.

My Submit button currently generates the correct error(s) if they don't fill-in all the required fields.

I'm looking for a way that if they haven't filled in all the required fields, they can save the form as a draft to return to later when they have all the information. 

Categories:
I have the same question (1)
  • SeanHenderson Profile Picture
    1,104 on at

    Hi @Anonymous 

     

    You can't leave required fields blank and still save it to the data source. You could leave a visual marker, like a star so the user knows the field is required, but then set the field to not required either in the app or in the data source.

     

    ---
    Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    As a Follow Up, the fields in SharePoint are not required, just on the App itself. I'm thinking out loud here so forgive me 😉

    My Required fields are dependent on variables I set based on choices made in other fields.
    If on the Form they choose "Add Vendor" or "Unblock Vendor" in the Request Type field then I set the variable to Yes:

    If(ReqType.Selected.Value = "Vendor Add" Or ReqType.Selected.Value = "Unblock Vendor", Set(varVenAddUnblock,"Yes"), Set(varVenAddUnblock,""))
    and the Cards have the Required setting to the following (Example Purchase card):

    Purchasespendtype Card:   If(PurSpendType.Selected.Result = "-" && varVenAddUnblock = "Yes",true,false)

    That part works and prevents the user from saving if true...

    Wondering, and going to test now, if they click the "Save as Draft" button, it first set the VarVenAddUnblock variable to "" and then submits will that work to "Save as Draft".. .. Testing worked. for now.. 😉

  • SeanHenderson Profile Picture
    1,104 on at

    The issue that you will have with this method is that once a user opens a saved draft, none of the previously stored variables will be in effect. You could try putting the variables into the OnStart property as well.

  • Community Power Platform Member Profile Picture
    on at

    OK.. so I thought the same thing after reading your response.. But, so far, Testing shows differently.. I added a label to show me the value of the variable.

    Here I am entering a new form, and you can see the Variable for Type of Request is "Yes" and the required fields are outlined in red:

    Saveasdraft.png

    I was able to click the "Save as Draft Button" and it saved without errors.
    When I opened that form to view or edit, the Variable was Yes and the fields again are outlined in Red:

    vardraftsave.png

    and if I try to click "Save" I get the error I expected.

    I am little baffled that it works, as the variable is set using the  "OnChange" for the "Type of Request" Field... so in theory what you stated should be correct, that the variable would be "Empty". after saving...

  • SeanHenderson Profile Picture
    1,104 on at

    Did you close down the app and open it fresh?

  • Community Power Platform Member Profile Picture
    on at

    I should preface this with..
    I took over the build of this "App" from someone that left the company and they started it as a "Customized SharePoint Form" App, rather than a "true" Power App..

    I did close out my browser, and did a Ctrl + F5 multiple times, as well as tried different browsers and the Variable is "Sticking".. 

    I also asked another user to check the "Draft" item and they also see the variable as "Yes" and the required fields outlined in Red..

    It's seems when the App loads, the "OnChange" is checked and seeing it as not the default value of "-" and thus setting the variable.

  • SeanHenderson Profile Picture
    1,104 on at

    So is it doing what you wanted now? Users can submit a draft and come back to it later, with the required fields left unfilled now highlighted?

  • Community Power Platform Member Profile Picture
    on at

    Yea.. I'm still not sure how.. hopefully it isn't a bug that will someday get fixed and break my Save as Draft.. But for now I'm going with it 🙂

  • tbeerman6646 Profile Picture
    4 on at

    It probably isn't practical with 100 fields (BTW, that's a big form!), but here's what I have done.

     

    I have a SAVE button and a SUBMIT button. I do not make any fields "required." On the SUBMIT button, DisplayMode property I use:

    If(IsBlank(DataCardValue102),DisplayMode.Disabled,
    If(IsBlank(DataCardValue103),DisplayMode.Disabled,
    If(IsBlank(DataCardValue104),DisplayMode.Disabled,
    //else mode
    DisplayMode.Edit)))

     

    Just keep adding data cards for each "required" field.  If you have a ton of fields that are required and only a few not required, reverse and use !IsBlank on the not required fields.

     

    The user can save, but not submit until "required" fields have data.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard