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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Save button

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I have a form in power apps with the following 3 buttons

 

save as draft - Click this as it sets the status to draft

Submit - Click this as it sets the status to submitted 

Save - Click this I only want to save any updates to the form

 

However everytime I click save it updates the form but keep setting my status to "Draft" and I guess its because of the following added to my status data card

 

Update - If(locIsSubmit,{Value:"Submitted"},{Value:"Draft"})

 

How can I adjust this to work so that when I click save it doesn't default to draft? 

 

Thanks

 

 

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at

    Hi @Matt2024 

     

    I would suggest to create a new variable locIsSave, and set its value to true when the "Save" button is clicked and false otherwise.

     

    Then try this code:

     

    If(
     locIsSubmit, 
     {Value:"Submitted"}, 
     If(
     locIsSave, 
     {Value:"Current Status"}, 
     {Value:"Draft"}
     )
    )

     

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Matt2024 Profile Picture
    on at

    Thanks, how would I get the LocIsSave to save what ever is the selected status? depending on what user selects?

  • Matt2024 Profile Picture
    on at

    @SpongYe I tried  the following but no luck

     

    If(
    locIsSubmit,
    {Value:"Submitted"},
    If(
    locIsSave,
    {Value:"ThisItem.'Request Status'.Value"},
    {Value:"Draft"}
    )
    )

  • SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at

    @Matt2024 

     

    That means that both variables locIsSubmit and locIsSave are false.

    Try something like:

     

    Set(locIsSubmit, true); //maybe your using UpdateContext please adjust the variable.
    If(
    locIsSubmit,
    {Value:"Submitted"},
    If(
    locIsSave,
    {Value:"ThisItem.'Request Status'.Value"},
    {Value:"Draft"}
    )
    )

     

    Now the Status should be Submitted.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Matt2024 Profile Picture
    on at

    @SpongYe 

     

    Thanks for getting back to me,  I tried the the above however even if I edit my status to rejected and click save I just get the this item.request output and not the actual status

     

    How can I have it so if I click save it will save what ever the approver has selected in the request status drop down?

     

    Thanks

  • SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at

    Can you share the submit code?

  • Matt2024 Profile Picture
    on at

    @SpongYe 

     

    Hi please find the code for my 3 buttons

     

    Save as draft - UpdateContext({locIsSubmit:false}); SubmitForm(Form1)

    Submit - UpdateContext({locIsSubmit:true}); SubmitForm(Form1)

    Save/update - UpdateContext({locIsSave:true}); SubmitForm(Form1)

     

    Below is my status field

     

    If(
    locIsSubmit,
    {Value:"Submitted"},
    If(
    locIsSave,
    {Value:"Current Status"},
    {Value:"Draft"}
    )
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard