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 / Duplicating SharePoint...
Power Apps
Answered

Duplicating SharePoint ID Number to New Column in Same Record

(0) ShareShare
ReportReport
Posted on by 193

I am trying to duplicate my ID number into another table cell (from ID to ID Digit) onSuccess automatically so I do not have to go in and edit my SharePoint list manually. The screen shot I have here shows where ID = 2776 and ID Digit = 2776 I have manually typed it in.

KimberlyM_0-1598392891065.png

This is my form that I want to be able to complete this on:

KimberlyM_1-1598393052556.png

When I click on the checkmark in the top right corner I have it's onSelect property set to:
SubmitForm(NewForm);

On the form I have onSuccess set as below so that a :
//ADD NEW LEAD CREATED ENTRY INTO LEAD_HISTORY SHAREPOINT LIST UPON CREATION OF NEW LEAD
Set(varNewLeadID, NewForm.LastSubmit.ID);
Patch(Lead_History, Defaults(Lead_History), {Title: "", Note: "New Lead Created", HistoryDate: Text( Now(), "[$-en-US]mm/dd/yyyy hh:mm:ss"), AgentCommenting: "", LeadID: varNewLeadID});

So what I was thinking originally that failed, to Patch Lead_Data (the SP list my form Submits to when I click on the checkmark) ID_x0020_Digit : varNewLeadID. So:
Patch(Lead_Data, Defaults(Lead_Data), {ID_x0020_Digit: varNewLeadID});

 

The outcome was the correct number but in a new record. How do I get it to post to the same record?
Honestly, I am thinking so hard on this that I am guessing that I am overthinking this. Thanks in advance for help!

 

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

    Hi @KimberlyM ,

    You are using the syntax for a new record - try this

    Set(
     varNewLeadID, 
     NewForm.LastSubmit.ID
    );
    Patch(
     Lead_History, 
     {ID:varNewLeadID},
     {
     Title: "", 
     Note: "New Lead Created", 
     HistoryDate: Text( Now(), "[$-en-US]mm/dd/yyyy hh:mm:ss"), 
     AgentCommenting: "", 
     LeadID: varNewLeadID
     }
    )

     

    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.

  • KimberlyM Profile Picture
    193 on at

    I don't want this ID number into Lead_History but into my Lead_Data table where the ID number actually is. Basically I am using this to call up data for my collection 2000 items at a time. Basically when it submits my form and creates the record ID number I want this number to be duplicated into the cell "beside" it in the same SharePoint table. If I Patch it there it creates a new record that has no details except for the ID number and the patched ID number of the previous item. (I am really hope I am making sense).

  • Verified answer
    WarrenBelz Profile Picture
    155,489 Most Valuable Professional on at

    Hi @KimberlyM ,

    Yes I know exactly what you are talking about - I wrote a blog on it.

    Please look at the "Bigger than 4,000" section - you need to Patch it back to the record and refer to the LastSubmit.ID in the syntax.

     

    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.

  • KimberlyM Profile Picture
    193 on at

    Thank you for your help @WarrenBelz ! Your comment and blog was a great assist to me as I was able to figure out exactly what I needed to do. I actually needed to patch my Lead_Data list and not my Lead_History so it took 3 attempts to work through and I am ready to move on to my next task! So thank you again.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 408

#3
timl Profile Picture

timl 339 Super User 2026 Season 1

Last 30 days Overall leaderboard