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 / Use a Toolbar button t...
Power Apps
Unanswered

Use a Toolbar button to change a form

(0) ShareShare
ReportReport
Posted on by 260

Hello

 

I want to use a toolbar button to update a form. Specifically I want to have a submit button that changes the "Submitted" Column to yes. I have tried to use the Select function to hit the toggle to do this, but that doesn't seem to work

 

 

Select(DataCardValue1); SubmitForm(Form1)

 

 

I'd rather not use collections if it can be avoided, since my form is a checklist with about 50 fields. I would consider it if there is no alternatives

ConnM_0-1686644521117.png

 

Thank you very much

Conn

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    To update a form using a toolbar button, you can set the value of the "Submitted" column to "Yes" by directly modifying the underlying data source. Here's an example approach you can follow:

    1. Add a toolbar button to your app, such as a button named "SubmitButton".

    2. In the OnSelect property of the "SubmitButton", use the Patch function or Update function to update the value of the "Submitted" column in your data source. Assuming your data source is a SharePoint list, you can use the Patch function as follows:

     

    Patch(
     YourDataSource,
     {ID: YourFormName.Selected.ID, Submitted: "Yes"}
    );
    SubmitForm(YourFormName)

     

    1. This code updates the "Submitted" column to "Yes" for the selected item in the data source (identified by the item's ID). Replace "YourDataSource" with the name of your SharePoint list or data source, and "YourFormName" with the name of your form control.

      The SubmitForm(YourFormName) call is optional and will submit the form after updating the "Submitted" column. You can remove it if you don't want to submit the form immediately after changing the value.

    By using the Patch function, you can directly update the data source without the need for collections or manipulating individual fields. This approach allows you to update the "Submitted" column to "Yes" using a toolbar button without having to modify each individual field in the form.

  • ConnM Profile Picture
    260 on at

    Thanks @ShaheerAhmad 

     

    I'm getting the error "This type of argument "ID" does not match the expected type number. Found type "Error".". 

     

    This is the code as I'm running it

     

     

    Patch(
     'MachineSetup',
     {ID: Form1.Selected.ID, Submitted: "Yes"}
    );
    SubmitForm(Form1)

     

     

    I appreciate your help

  • ConnM Profile Picture
    260 on at

    Is there a way of using the Gallery1.Selected to help

     

    This doesn't work, but is along the lines of my thinking

    Patch(
     MachineSetup, Filter(MachineSetup, ID=Gallery1.Selected, 
     {Submitted: "Yes"}
    );
    SubmitForm(Form1)

     

     

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard