donb26 Posted March 29, 2002 Posted March 29, 2002 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.
RussBaker Posted March 29, 2002 Posted March 29, 2002 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
Fitch Posted March 29, 2002 Posted March 29, 2002 Use the Replace() function. The shortest answer yet! Let me know if you need more detail.
donb26 Posted March 29, 2002 Author Posted March 29, 2002 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.
RussBaker Posted March 29, 2002 Posted March 29, 2002 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 ]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now