Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3511 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a layout that performs a script OnRecordCommit.  The script includes a sort.

How can I "mark" the record and then, after the OnRecordCommit script finishes, return to the same record?

Thanks,

Kevin

Posted

IMHO, a better solution would defer the sort (perhaps even the commit) until after the user is done with the record - so it wouldn't be necessary to return to it.

In what type of view is the layout you're in when doing this?

Posted

comment has a better answer if you don't need to commit, but if you do...

You can go simple and dirty or you can go complex and clean.

Simple: Grab the record's unique primary key then loop through your newly sorted found set until you get to the right record.

Complex (helpful if you have a huge number of records, or if they are "wide" or if performance is really important): Created a summary List of the primary keys. Grab the primary key of your record, then sort. Grab the Summary list of and find your primary key in that list using a custom function like ValuePosition(). Use that number to Go to Record[]...

Posted

Created a summary List of the primary keys.

​OP's profile shows version 11.

Incidentally, I am quite sure this was visible on the side bar when I posted my answer, but it's not visible now.

This topic is 3511 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.