Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

auto enter numbers minus certain numbers

Featured Replies

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

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( "

Another variation would be to not stop, but just skip the SKUs in the global:

Freeze Window

Go to Layout [

CreateSKUs.zip

  • Author

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?

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.

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

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.

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"),"

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.

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

Aha! Now I see the reason for your

Exit Loop If [
  • Author

thanks guys

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.