MIS Systems Thread, eportal-generate usernames in Technical; Does anyone have a list of the functions for generating eportal usernames in CMIS?
One of the default templates looks ...
-
15th December 2009, 10:59 AM #1 eportal-generate usernames
Does anyone have a list of the functions for generating eportal usernames in CMIS?
One of the default templates looks something like this
RemoveVowels(contact.Forename + contact.Surname)
So if you're name was Arthur Brain it the username would be rthbrn I've worked out how to add a prefix but I'd like it to generate a random number after this at least four characters long.
-
-
IDG Tech News
-
15th December 2009, 02:56 PM #2 To the best of my knowledge, there is no random function in the reports engine. The best I could suggest, if you want to create a non-guessable user name, would be to compile some sort of munge based on other elements from the users name, kind of depends on how complex you want to get with it. One quick example of a number munge would be:
n := Contact.Name; o := 1; Loop(n > '', (o := o * Replace(Upper(Left(n, 1)), 1, 'A', 2, 'B', 3, 'C', 4, 'D', 5, 'E', 6, 'F', 7, 'G', 8, 'H', 9, 'I', 10, 'J', 11, 'K', 12, 'L', 13, 'M', 14, 'N', 15, 'O', 16, 'P', 17, 'Q', 18, 'R', 19, 'S', 20, 'T', 21, 'U', 22, 'V', 23, 'W', 24, 'X', 25, 'Y', 26, 'Z', 27); n := Right(n, -1))); Abs(o) % 9999
Not tested this in the generate usernames area, mind you, but it should probably work.
Edit: Just tested it, and it should work fine, I reused the Student contact - Template 3 and entered:
n := contact.surname + contact.forename; o := 1; Loop(n > '', (o := o * Replace(Upper(Left(n, 1)), 1, 'A', 2, 'B', 3, 'C', 4, 'D', 5, 'E', 6, 'F', 7, 'G', 8, 'H', 9, 'I', 10, 'J', 11, 'K', 12, 'L', 13, 'M', 14, 'N', 15, 'O', 16, 'P', 17, 'Q', 18, 'R', 19, 'S', 20, 'T', 21, 'U', 22, 'V', 23, 'W', 24, 'X', 25, 'Y', 26, 'Z', 27); n := Right(n, -1))); StripNonAlphaNumChars(contact.surname + contact.forename) + Right('000' + Str(Abs(o) % 9999), 4)
which successfully generates usernames with a four digit unguessable munge code appended.
Last edited by SkywOrca; 15th December 2009 at 03:14 PM.
-
Thanks to SkywOrca from:
CheeseDog (15th December 2009)
-
15th December 2009, 03:38 PM #3 Cheers, worked a treat.
Do you have list of the functions you could send me?
-
-
15th December 2009, 04:52 PM #4 It uses functions available in the reports engine (possibly with some limitations). There is no current definitive document of functions that are available, however I have been attempting to compile one for some time. Hopefully I'll be able to release this soon, which should go up on the Link2ICT website.
-
SHARE:
Similar Threads
-
By mrstephenw in forum Windows Server 2000/2003
Replies: 6
Last Post: 14th December 2009, 01:42 PM
-
By russdev in forum MIS Systems
Replies: 13
Last Post: 14th July 2009, 09:24 AM
-
By Iain.Faulkner in forum How do you do....it?
Replies: 38
Last Post: 24th May 2009, 11:44 AM
-
Replies: 5
Last Post: 18th March 2009, 09:07 AM
-
By DaveP in forum O/S Deployment
Replies: 6
Last Post: 22nd October 2008, 11:23 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules