Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2015
    Posts
    2

    Unanswered: Auto generate alpha numeric ID

    Hi, everyone please how to i have a field to automatically generate alpha numeric ID in brilliant database
    thanks

  2. #2
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi
    Not doing any work with BD lately but if you could expand on on your requirements for alphanumeric field we might be able to suggest some work around. Could you combine a auto number with a fixed selection of characters?
    Regards
    David

  3. #3
    Join Date
    Oct 2013
    Location
    Philippines
    Posts
    103
    Hi,

    This is possible, but you have to create a script for each character in the field. Sample output would be "PO-ID_NO-DATE"

    Thanks

    Ernie

  4. #4
    Join Date
    Dec 2012
    Posts
    86
    MD5 creates an Hash with results in a alphanummeric ID.
    Its a long id by the way...

  5. #5
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    This is something I get asked for often. Basically you need to use a Maths/Logic Function to populate a variable. For example, RND(26) will generate a random number between 1 and 26 if you apply formatting to it.

    You now need to convert the random value into a letter.

    For example,
    if Variable = 1, then Variable = A,
    else
    if Variable = 2, then Variable = B
    else
    if Variable = 3, then Variable = C
    else
    if Variable = 4, then Variable = D

    And so on.....

    Do this for all 26 letters of the alphabet and you will have a random single letter generator.

    To have more random letters at the same time, just scale it all up. and merge the results of each single letter generator to whatever field you want to display the values.

    Regards
    James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •