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 / Patch a new record to ...
Power Apps
Answered

Patch a new record to a list from a form

(0) ShareShare
ReportReport
Posted on by 49

Hi, so I have this form where people can go and create a new project, it works just as you'd expect. It lets users fill out the fields and then on submission it will reflect their inputs on a backend SharePoint list called Project Requests. However, there is another list called Project Tracker where I want to be able to track the status of projects and I'd like it so that when a user submits the project request form, I can patch a new record into the project tracker list as well. The record on the project tracker does not need all the fields to be filled in, mainly just the project ID field so that if a user were to look at that value they could go to the ID of the project request list and find the project that is being tracked. 

 

Here is the request screen and the ID data card is there, it is just hidden b/c the user doesn't need to see that. 

Techgallagher_0-1602183457380.png
This is the formula for the submit button. I've tried a bunch of things, but I either get errors like title is required or I can't get the right data type, etc. 

Techgallagher_1-1602183535685.png

Here is the Project tracker list: Project name is the title field, project id is a number data type, progress is a choice field, priority is also a choice field, assigned to is a number field because I'm also connecting that to employee ids and notes is multi lines of text

Techgallagher_2-1602183652483.png

 

 

 

 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Techgallagher 

    First, consider moving anything except SubmitForm out of your Submit button OnSelect and move whatyou are trying to do into the OnSuccess action of the Edit form.  This way your formula will only apply once the form submit is successful.  With your formula currently, if there is an error in the submit, your patch would still happen...probably not what you want!

     

    Then in the OnSuccess action - this formula:

    Patch('Project Tracker', Defaults('Project Tracker'),
     {
     Title: Project_Req_Form.LastSubmit.'Project Name',
     ProjectID: Project_Req_Form.LastSubmit.ProjectID,
     ...and so forth for the remaining columns you want...
     }
    );
    Navigate('Success Screen', Fade)

     

    That should give you what you want.

     

    I hope this is helpful for you.

     

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Techgallagher ,

    Select the Form and Set OnSuccess Property.

    Patch(SpList, Defaults(SpList), {Column1: Value, Column2: Value})

    VijayTailor_0-1602184389134.png

     

    Thanks,

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

     

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 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard