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.

Featured Replies

 

Hello! I am building a database and came up this little problem can help.

The identification number is composed of 9 digits, the first 8 digits being in series and the last one is digit check based on the algorithm of Luth, that is, instead of confirming and manually entering the identification number, there would be no a calculation / script that when creating a new record it created an identification number with the requirements above.

Here is an example:

19510889 2

19510890 0

19510891 4

Thank you,

Your requirement is not clear.

First , I don't know what "the algorithm of Luth" is. If you meant the Luhn algorithm, then your examples don't make sense, because the expected results would be:

19510889    9
19510890    7
19510891    5

Please clarify. - and no less importantly, please update your profile so that we know which version and OS you're using.

 

Edited by comment

  • Author

 

Hello! My System is Windows 10 and the version is Filemaker Advanced 18.

I would like if possible that the first 8 numbers were a predefined series (eg 19510889), then Filemaker would compute and add the check digit (eg 9) to the field. That is, in the ID field (ex.) It appeared at the end 19510889 9 In other words, when creating a new registry it would automatically put the serial number + the verification digit

Examples:

John ID - 19510889 9

Steve ID - 19510890 7

Alex ID - 19510891 5

The verification digit is based on the Luhn algorithm. Thank you for your support.

I would use two fields for this: a SerialID field auto-entering a serial number (you can set the starting value at any number), and a calculation field (result is Number) =

While ( [
number = SerialID ; odd = True ; sumDigits = 0 
] ;
number ; 
[ 
digit = Mod ( number ; 10 ) ;
value = digit * ( odd + 1 ) ;
value = If ( value > 9 ; value - 9 ; value ) ;
sumDigits = sumDigits + value ;
number = Div ( number ; 10 ) ;
odd = not odd
] ;
10 * SerialID + Mod ( 9 * sumDigits ; 10 )
)

 

If I may ask, what's the purpose of using such ID's? How do you plan to use this?

  • Author

 

Hello!

Many thanks to the formula works very well.

The numbers will be used for military identification.

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.