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 / Trying to create submi...
Power Apps
Answered

Trying to create submit button to update another field

(0) ShareShare
ReportReport
Posted on by 22

I am new to power apps and still learning

 

Basically what I am trying to do is Add the basic submit button and when the user clicks that button in the app it updates my Attending Field to YES and submits the item to my list.

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Smatera9681,

    Could you please share a bit more about your scenario?

    How do you summit your data into your SP list? Using SubmitForm function?

    Do you want to update the Attending field of the submitted item to YES within your SP list?

    I assume that you use SubmitForm function to submit your form data into your SP list, and want to update the Attending field of the submitted item to YES, is it true?

    If you want to update the Attending field of the submitted item to YES, I think the Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

    Add a button control within your app, set the OnSelect property to following:

    SubmitForm(EditForm1) /*<- EditForm1 represents the Edit form control within your app */

    Set the OnSuccess property of the Edit form (Editform1) to following:

    Patch(
     'YourSPList',
     EditForm1.LastSubmit,
     {
     Attending: YES
     }
    )

    Or

    Patch(
     'YourSPList',
     LookUp('YourSPList', ID = EditForm1.LastSubmit.ID),
     {
     Attending: YES
     }
    )

    More details about the Patch function, please check the following article:

    Patch function

     

    In addition, if you want to update an existing record in your SP list using Patch function, please take a try with the following formula:

    Patch(
     'YourSPList',
     LookUp('YourSPList', ID = "The specific List Item ID"), /* <-- Find the speific item you want to update based on Primary/Identity column */
     {
     Column1: "xxx",
     Column2: "xxx",
     Column3: "xxx",
     ...
     }
    )

     

    Best regards,

    Kris

  • Smatera9681 Profile Picture
    22 on at

    Hi Kris

     

    Thanks for the Reply.  Basically here is my scenario

     

    1. We have an attendee list for a lunch and learn, users will get an email about the lunch and learn and click on the link to the Powerapps form

    2. The form will appear and they click on the button which says they will attend.

    3. Once they click the button this will put a recod in the attendee list stating they will attend

    4. I have a field call attending which is a yes or no field when they accept the lunch and learn I would like the submit button to write the record to the list as well as change the Attending field to Yes for that record.

     That is pretty much it in a nutshell

     

    Please let me know if you have any other questions as I hope this answers things for you

     

    Thanks

  • Smatera9681 Profile Picture
    22 on at

    ALso just to add my list is Called Attendee List, I am running into issues when using patch commands here is what i have

    Patch('Attendee List',Form1.LastSubmit,{Attending: YES})

    The above syntax tells me i Have three errors that state the following

    1. Name isnt valid. This identifier isnt recognized. This error appears most commonly when a formula refers to something that no longer exists

    2. Same error as number 1

    3. The Function patch has some invalid arguments

     

    Let me know if you need more info

     

    Thanks

     

  • Smatera9681 Profile Picture
    22 on at

    Here is a screenshot to helppowerapps.jpg

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Smatera9681,

    Do you mean that the 'Attendee List' is a SP list on your side?

    Could you please share more details about your error message?

    If the Attending field is a Yes/No type column in your SP list, I think there is something wrong with the formula that you provided.

    Please take a try to modify your formula as below (Add the following formula within the OnSuccess property of the Edit form control😞

    Patch(
    'Attendee List',
    Form1.LastSubmit,
    {
    Attending: true /* <- Change YES into true */
    }
    )

    Or

    Patch(
    'Attendee List',
    LookUp('Attende List', ID = Form1.LastSubmit.ID),
    {
    Attending: true /* <- Change YES into true */
    }
    )

    when you submit your form data using SubmitForm function (via clicking the "Submit" button), above formula would be executed.

     

    Best regards,

    Kris

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard