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

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

Recommended Posts

  • Newbies
Posted

I'm trying to take a list of records, each uniquely numbered 2, 4, 6, etc. up through 100, and dynamically change their ranking values if one of the records changes values.

What I mean by this is if the record with a field value of "2" needs to change to "16", and then what used to be "16" needs to go somewhere new.

I can't figure out a good way to control this change process. There seem to be two issues, one of the leapfrog state where there are two records being affected simultaneously, the one with the current value and the one with the destination value ... I'm not sure if I worded that very well.

The other issue is a way to have all the remaining, unaffected records shuffle accordingly.

Thanks!

Posted

What you have to do is script the whole process really tightly. In a system I did I put little up and down buttons on each record (in list view) so moving a record was just a matter of clicking the appropriate button on the desired record. The process went something like this:

Initial settings: all records found and database is sorted by sort number ascending (small numbers at top). Sort numbers are (in your case) even.

Move record up script: minus 1 from sort number, reserialise records using the replace script step, resort database.

Move record down script: add 1 from to number, reserialise records using the replace script step, resort database.

That's it. Pretty simple really. The trick is replacing the serial number each time. Note that you *do not* want to base your sort or reserialise a field that is used in any relationship!

This topic is 8234 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.