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 Platform Community / Forums / Power Apps / Set value of field fro...
Power Apps
Unanswered

Set value of field from button OnSelect

(0) ShareShare
ReportReport
Posted on by 104

In my SharePoint list, I have a Status choice dropdown column with the options "Draft", "In Progress" and "Complete".

On my PowerApp, I have a "Save" button, that when pressed, need to set the value of the Status column to "Complete".

Is this possible? Any help would be appreciated. Thanks!

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @SamB2 , On save button, what is the code you have? Are you patching any more columns also to SP? Please elaborate more.

     

    Thanks,

    ANB

  • SamB2 Profile Picture
    104 on at

    HI @ANB , the code in the OnSelect property of the button is:

     

    If(
    SharePointForm1.Valid,
    SubmitForm(SharePointForm1);
    Notify("Form Saved Successfully",NotificationType.Success);
    Navigate('Previous Submissions'))

     

    Let me know if you need any more info. Thanks!

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @SamB2, So, you want to always set to "Complete"? Also are you showing the Choice field in your form?

     

    Thanks,

    ANB

     

     

     

     

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @SamB2 , Basically you need to make changes to "Update" property of datacard to "Complete"

     

    ANB_0-1696934738046.png

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

    I hope this helps.

    Please click Accept as solution ✅if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB

  • SamB2 Profile Picture
    104 on at

    Yes, when that save button is selected then Status always needs to be complete. The choice field is not visible on the form.

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @SamB2 , Then please follow below steps:

    1. Add the Choice field on your form by using below steps:
    2. ANB_0-1696935040403.png
    3. Then once it is added to form, unlock that datacard and change the "Update" property as shown in previous response to {Value: "Complete"}
    4. Then make the visible property of the Datacard to false.

    So, in this way you will not show the choice field on form and by default when user clicks on save button, the complete status will be updated at SP.

     

    Please try and let me know if this works for you.

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

    I hope this helps.

    Please click Accept as solution ✅if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB

  • SamB2 Profile Picture
    104 on at

    Thanks @ANB and apologies if I wasn't being clear - however I have another screen with the same form on (with different fields visible) which have a "Save as Draft" and "Submit" button, when these are pressed then the Status shouldn't be marked as "Complete". It is only on the 2nd screen (for admins) when the Save button is hit, the status should be marked as complete. 

     

    If I amend it as per your instructions, I assume the status is always going to be complete regardless of whether, Save as Draft, Submit or Save are pressed?

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @SamB2 , That is the reason , whenever you raise a query on forum try to be more elaborative which will help forum member to help you in one go.

     

    Anyways, now coming to your requirement, how do you distinguish between normal user and admin user? 

     

    Thanks,

    ANB 

  • SamB2 Profile Picture
    104 on at

    I am using a SharePoint group with the admin users in. And only those who are in the admin group can see the "Admin Screen" button.  All of other users are normal users and can't see the admin screen.

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @SamB2 , So basically just need to know whether the logged in user is Admin or not. For that there is very good video by Reza: https://www.youtube.com/watch?v=dIzOAbMjN7g

     

    So, if you see this video, Reza is explaining how to know whether logged in person is Admin or not and it is stored in a global variable.

     

    So, now you just need to change this on "Update" property: 

    If(IsAdmin = true, {Value: "Complete"})

    If the person is not admin, then in that case it will basically do nothing.

     

    Please try and do let me know if this work for you.

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

    I hope this helps.

    Please click Accept as solution ✅if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB

     

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard