Jump to content
Server Maintenance This Week. ×

Duplicate records and mark Serial ID with letters A to Z [Beta-]


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

Recommended Posts

Solution / :) Duplicate records and mark Serial ID with letters A to Z

Description: This sample file shows how to increase a serial number with a letter A to Z if You duplicate a record with a script.

It avoids the problem of double serial numbers when You duplicate an older duplicate and always sets to the highest next letter.

After 26 duplicates ( letter Z ) it switches to next available Serial number.

A custom function with FM 8.5 List function is applied .

Could also be used as a simple Archive if You mark the “old” records as inactive.

Working Under:

Solution Status: Beta

Pre-requisites: NEEDS FM 8.5 minimum

Author(s): Ohgo_Ohgo

Date: 10/16/06

Credits: Database Pros has a sample file A to Z Serial which is the original idea. http://www.databasepros.com/

Instructions / Other Info: Uses Custom Function or you can use directly in the script

SerialNextAZ ( Field ; RelField )

Let ( [

Serial = GetAsNumber ( Field );

Letter = Right (RightWords( RightValues ( List(RelField);1);1);1);

Position = 1 + Position("ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Letter;1; 1);

Next = Middle( "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Position;1) ];

Serial & Next

)

Disclaimer:

FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify.

DupSerialAtoZ.fp7.zip

Edited by Guest
add Database Pros link
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

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