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 / New Form with Based on...
Power Apps
Unanswered

New Form with Based on Selected Item from Gallery

(0) ShareShare
ReportReport
Posted on by 26

I have a main gallery with the option to add a new record and edit a record.  

I would like to have it so when you click into an old record you can add another line into your database with the default values being the old record plus any adjustments you made.  I would like to not lose the old record after editing, but rather create a new record

 

For example (old Record):

Name: Jim

Date: 10/2/2020

 

New Record:

Name: Jim

Date: 12/2/2022

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,306 Most Valuable Professional on at

    Hi @Jseo ,

    It would be something like this to add the existing name

    Patch(
     SPList,
     Defaults(SPList),
     {Name: ThisItem.Name}
    )

     

    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.

    Visit my blog Practical Power Apps

  • Jseo Profile Picture
    26 on at

    Hi @WarrenBelz ,

     

    Sorry for the question being so vague. 

    The pencil in red allows me to edit the the record. I would like the paper airplane in blue to open a "new form" that creates a new record in my SQL database, but keeps the current record that I selected from my Gallery to be the default for the fields.

     

    Jseo_1-1652137762991.png

    Ideally I would like the settings to look like an "Edit Form" but with a "New Form" functionality. (something similar to below)

     

    Jseo_3-1652138017975.png

     

     

    My settings for the form are below, which do not work. Can I use your patch in any of these settings?

     

    Jseo_2-1652137925729.png

     

     

  • WarrenBelz Profile Picture
    156,306 Most Valuable Professional on at

    Hi @Jseo ,

    You would set Variables for the values in the current record, then use those as the Default for the items in your new form.

     

    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.

    Visit my blog Practical Power Apps

  • Jseo Profile Picture
    26 on at

    Hi @WarrenBelz ,

     

    I am not too sure how to do that.

     

    My new Form settings are:

    Jseo_0-1652185935738.png

    I want my ticker in my "New Form" to be populated by the record I selected in my "Browse Gallery". I get a behavior error.

    Jseo_1-1652186227907.png

    Could you tell me where I am going wrong?

     

    Thanks a lot!

     

  • WarrenBelz Profile Picture
    156,306 Most Valuable Professional on at

    Hi @Jseo ,

    You cannot run a Patch in the Default of a control - you need to trigger it on an event (OnSelect of a button, OnChange of a control etc), so OnSelect of the gallery would be a good place. Please also read this Microsoft document on Variables

     

    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.

    Visit my blog Practical Power Apps

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard