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

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

Recommended Posts

Posted

First off, I am really intimidated by this site. You guys are sooo freakin smart. Anyway, I have a script that loops to create 10,000 new records. I want to return to the first record and renumber the found set from 1 to 10,000. EXAMPLE: 123450000.....1234599999. I cannot for the life of me remember how to script the renumber part so that when I click on the button to create the records, the whole process is done transparently and seamlessly. Thanks in advance. And BTW, no really big words. I'm kinda dense.

Posted

Why not have the field enter a SERIAL NUMBER. Starting from 1 and incrementing by 1 on each new record.

Posted

If you do want to renumber after the records have been created, Replace Field Contents is what you want. It has a serial numbers option.

Posted

Welcome to the Forums, Jim. You'd look smart if you'd be using FM for 10+ years, too!

Posted

Correct. However, the initial number exists as 1234500000.I cannot replace this number and add a sequential serial number. I don't know how I would enter the starting number on the "replace with serial number" dialogue box.

Posted

I'm lost. Each record should have a unique ID. You want to manually enter the IDs, either during or after the loop and have them all start with 12345?

It's really unusually to create 10K blank records. Would you be willing to tell us the big picture?

Maybe a batch number would be the answer?

Posted (edited)

Okay, let me start from the beginning. I have a table with 10 digit NGIP (National Governmental Institute for Procurement)Commodity Codes for items issued from a maintenance facility store room. Each code begins with a class code-the first three digits and a sub-class code, the fourth and fifth- (123-45). The next 99,999 are for assigning your own code to a specific item. My inherited codes table classes and sub-classes are all over the matrix, using all sorts of classes and sub-classes. I am building a gap analysis table to compare existing codes to probable code combinations using often used classes and sub-classes peculiar to my operation. The 10 digit number is then the join. Where there are gaps in the table I am creating, I can use those codes to populate the Commodity Code field for the appropriate new item. I have to manually create the new records based on these class and sub-class combinations. The record creation is easy. I need to renumber the new set of 100,000 to each have a unique sequential number; eg XXXXX00000 to XXXXX99999. I'll wind up with potentially over 20 million records. Whew, now I'm tired.

Edited by Guest
Posted

I don't think I understood a word from that - except perhaps this:

The record creation is easy. I need to renumber the new set of 100,000 to each have a unique sequential number; eg XXXXX00000 to XXXXX99999.

Instead of renumbering, why don't you create them with the correct numbers to begin with, i.e.

Set Next Serial Value [ Table::SerialID ; < calculation > ]

Loop

...

This is assuming that the starting number can be computed from some existing data ... ?

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