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.

Creating Unique Key Values

Featured Replies

I have a db: Employment Oppurtinities, that allows a user to create a Job Order and then view eligible candidates (Full-time, Part-time, Both) in a portal. I want to assign a unique identifier (JobOrderCode) to each order that I can in turn assign to candidates meeting that order's criteria. To keep it simple, I want to combine the order date and the record number into a text value. I tried this calculation:

JobOrderCode

NumToText(Month(Order Date)) + NumToText(Day(Order Date)) + NumToText (Year (Order Date)) + (@@)

where (@@) should be the record number (i.e. 5)

thinking that September 4, 2001 (record 5) would become 9420015

However, the calculation does not accept (@@), and [NumToText(Month(Order Date)) + NumToText(Day(Order Date)) + NumToText (Year (Order Date))] returns a 4 digit number (i.e. 9/4/2001 becomes 2014).

I thought that using NumToText(xx(Order Date)) would convert the numeric values to text and prevent their being added together. What have I missed?

To combine text fields, use the ampersand.

Hi,

Here's what I would do :

1- don't use NumToText

2- instead of using the "+" sign, use the "&" sign

Your calc is then :

Month(Order Date) & Day(Order Date) & Year (Order Date) & @@

I think it should work... Does it ? crazy.gif" border="0

Hi,

Here's what I would do :

1- don't use NumToText

2- instead of using the "+" sign, use the "&" sign

Your calc is then :

Month(Order Date) & Day(Order Date) & Year (Order Date) & @@

I think it should work... Does it ? crazy.gif" border="0

Try it this way:

Status( CurrentDate ) & Status( CurrentRecordID )

This should give you what you are looking for.

Good Luck,

Martin Wiedemann

  • Author

Thanks Olive; that worked.

  • Author

quote:

Originally posted by Afeina Software:

Try it this way:

Status( CurrentDate ) & Status( CurrentRecordID )

This should give you what you are looking for.

Good Luck,

Martin Wiedemann

Thanks Martin; Status(CurrentRecordID) creates great index values! I thought I was going to have to find a way to create "000xx" or some such values to append to the date values.

I use right("000000" & status ( currentrecordID ), 6 ) & "-" & right("000000" & status ( currenttime ), 6 ) & "-" & right("000000" & status ( currentdate ), 6 )

This gives you a nice unique semi-random meaningless 20 character ID. Virtually impossible to break.

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.