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

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

Recommended Posts

Posted

question is:

can i have fm auto enter skus starting at 100038 and go up from there. and skip specific numbers

i need to enter in some skus. i have a book shelf with a lot of books that i put online. they all have skus. i lost my harddrive so i am starting over.

i have a list of those books in a db. they are in order from lowest sku (10038 is the first sku) to highest. however i do not have the numbers that are supposed to go in the sku field. i would run a script that would enter the numbers in and increase by one but the problem is, i sold some books before i lost my db. so the skus skip a number once in awhile.

ie

car book sku 100038

plane book sku 100039

cat book sku 100041

again my question is:

can i have fm auto enter skus starting at 100038 and go up from there. and skip specific numbers

Posted

You can change auto-entered values, even ones set to not allow modification, in a script.

So set a global field with all skus that should not be used, separated by carriage returns. Then when your next record is created, test for the sku in the global field like this:

Loop

Exit Loop If [ not PatternCount( "

Posted

i cannot get these to work right.

instead. how could i set the field to not allow duplicates?

i can import the list of skus that shouldnt be entered as seperate records then run a script that enters the skus +1 EACH TIME and if the error message appears it will +2

would that work?

Posted

Make a database where each record has the sku you want to exclude. Make a relatyionship between the two databases based on the sku number.

Every time you make a new record, see if it has a related record in the other file. If it does delete it and make another record.

When you find you want to exclude more skus then add them to the other database.

Posted

Hmm, what do you mean 'to not stop'? It just seems that you're complicating the process compared to mine. Maybe I'm missing something. Oh, and you don't need the initial If, just flip your Exit Loop If and your Set Field inside the loop. smile.gif

Posted

There's no need to delete the record. You can test the validity of the relationship, and when one is found not to be valid, use the Set Next Serial Value ["sku", "sku + 1"] to prevent duplicates.

Posted

Would this necessarily be scripted ?

With a given ID structure set to auto-enter a text calc of type "ID"&Right("000000"&serial,6) and an auto-enter serial number....

So n_serial and t_ID

We can identify a next missing serial with

c_BooleanNextIsMissing =Case(not Patterncount(ValueListItems(Status(CurrentFileName),"IDsLists"),"ID"&Right("000000"&(n_serial+1),6)

Case(not n_serial = Patterncount(ValueListItems(Status(CurrentFileName),"SerialLists"),"

Posted

Oops, I was somehow thinking he wanted to create a bunch of new records, but not those SKUs that already existed. But, as everyone else could see, he just wanted an auto-enter SKU. Sometimes I can't see the forest for the trees.

Posted

Um, I think you're thinking the converse here. We want to ignore any of the numbers in the global, related file, or whatever, and not have any skus set with them. Your idea seems to be the opposite--using the numbers in the global or related file instead of skipping them. Nice setup though. Maybe you can tweak it to work for this situation. laugh.gif

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