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 / Navigate and edit reco...
Power Apps
Answered

Navigate and edit record with highest ID

(1) ShareShare
ReportReport
Posted on by 6

Hi,

 

I created a table style gallery that contains a button to duplicate a record.
All works well, but when I run the OnSelect, it takes me to the original record in the form, not the copied record.
So my question is, how do I find and navigate to the copied record (=highest ID) so I can edit the copy?

 

My current OnSelect of the button:

Patch('MySharepointList',Defaults('MySharepointList'),{Title:ThisItem.'MyTitle'});
Set(SelectedItem, ThisItem);
Navigate('New order')

 

I tried the functions Last and Max but couldn't get it to work, any help would be great.

Thanks in advance!!

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    37,212 Super User 2026 Season 1 on at

    Hi @Miguel_Lujan 

    If SelectedItem is the record that you're showing in your edit form, you can try this:

    Set(SelectedItem, 
     Patch('MySharepointList',
     Defaults('MySharepointList'),
     {Title:ThisItem.'MyTitle'}
     )
    );
    Navigate('New order')
  • Miguel_Lujan Profile Picture
    6 on at

    Hi Tim, thank you so much for your fast reply and your elegant solution! 👍

  • timl Profile Picture
    37,212 Super User 2026 Season 1 on at

    You're welcome @Miguel_Lujan - glad to help!

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

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard