Jump to content

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

Recommended Posts

Posted

I have a database of employees which has a layout listing them by seniority. The sort is by a number field (manually entered). When a record is deleted, let's say #50 of100, how do I get the records from there down to move up one number? I,ve tried changing to a calculation field and using (currentrecordnumber) but can't seem to make it work.

Posted

Do you actually want to sort them by the number or is it really by the seniority date? If it is the latter, then sort your list by Seniority_Date from oldest to most recent. This will give you the most senior as the first record. Then on your layout, type in the record number text "@@". Now, the record number will display on each record and this would be your seniority number.

Otherwise, its the script approach.

Russ Baker

Posted

Use the Replace() function.

The shortest answer yet! cool.gif

Let me know if you need more detail.

Posted

Russell: Yes, I could sort by hire date instead but how would I then make my Seniority Number update?

Fitch: Yes, more details if you please.

Posted

Once you have the found records you want and have them sorted by the seniority date, run this script:

code:


GotoRecord [First]

Loop

SetField[seniorty_Number,"Status(CurrentRecordNumber)"]

GotoRecord [Next] [Exit after last]

EndLoop

Russ Baker

[ March 29, 2002, 06:16 AM: Message edited by: Russell Baker ]

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