AnsweredAssumed Answered

How to Auto-Generate a "Code" Using Data from Multiple Other Records

Question asked by arobison1 on Jul 13, 2018
Latest reply on Jul 13, 2018 by arobison1

How can I auto-generate a code for each record that contains information from different fields in my DB?  For example, I would like the code to have this format: "000001.USA.en" where the number is just an incrementing serial number (I know how to do that), the three uppercase letters are the ISO country code, and the lowercase letters are the ISO language code.  How can I string all these together into one code.  (p.s. this is not intended to be the primary key, just a simple code needed by my employer.)


Each record will contain the country and language, but I would like the corresponding ISO codes (stored in the "Countries" and "Languages" tables) to be used in the generation.