Jump 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.
Juggernaut

Featured Replies

As Subject:

How to do it?

The unique number generate by current date.

For example,

I like to have an index number field called POR# (Purchase Order Request number).

The number has the 7 digit format: ymmdd##

eg. Today is 2006/4/18,

the first POR# will be 6041801.

The second POR# will be 6041802

The third POR# will be 6041803

...

etc.

BTW, I have the following function working for the ymmdd, but I don't know how to get the last 2 digit to work.

Also, the mm seems to has only 1 digit, since it April, so the mm became 4 instead of 04.

POR# = Right(Year ( Get ( CurrentDate ) ); 1) & Month (Get ( CurrentDate ) )&Day ( Get ( CurrentDate ) )

Though I would probably recommend using two digits for the year, instead of one, what you desire can be accomplished via both calculations and scripts. If you are in a single-user situation, then calculations are fine. If you are in a multi-user situation, then it is safest to script the solution.

However, I would not use the POR as the key field in either scenario, but merely as a visual reference. The key field for relationships is best when absolutely unique and meaningless, such as an auto-entered serial number, and virtually unseen by users.

To prepend zeroes to months and/or days, you can use Right( "0" & ValueOrFunctionProducingValue; 2 )

  • Author

I have an idea to have the POR# searching the newest POR# for today. And then increase it by 1.

Do you think the idea is good for a not single user input envirnment?

Why do you need a number in this format? There is a definate potential for problems using the formulas you provided:

a) as -Queue- mentioned the Year being only 1 character limits your number to ten years.

:D the last 2 digits limit you to 99 requests per day.

You may think it will never last ten years or that no more than 99 requests will ever be made in a day but **** happens. Wasn't it Bill Gates who said no-one will ever need more than 1MB of memory? ... oops.

Create an account or sign in to comment

Important Information

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

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.