Hello Everyone!
I am wondering how would you go about creating a user id that is a total of 11 char?
The user ID starts off with either a P or E depends on the account type,
All listing in the database must have id, the ids are formated in the formate of:
E-nnnnnnnnn or P-nnnnnnnnn NO to users name can be the same but both P and E could have the same number and this is because the P or E make it different
E-235567889
E-846568735
E-564651549
P-456745321
P-352589739
would this be hard to do and also would it be hard to make this into a exenal function() so that I can use it with a number of scripts
like when the system its self is adding a record then it needs also to add the id to the record for the Entity
I think I know how to make it a function already, just am not sure the best way to have it make the numbers and also check to make sure its not used already
I think the function would go like this:
tell func if its a E or P id needed
func creates number (9 char) then take that number and adds either the P- or E- to the start of the number, once it has the id it compares it to a table of ids if it finds the id in the table it starts again if it does not find the id then it returns the new id
Any advice on this would be great, thank ahead of time!
Sincerely,
Christopher