+ Post New Thread
Results 1 to 4 of 4
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 ...
  1. #1
    CheeseDog's Avatar
    Join Date
    Jan 2006
    Location
    West Midlands
    Posts
    217
    Thank Post
    5
    Thanked 2 Times in 2 Posts
    Rep Power
    18

    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.

  2. #2
    SkywOrca's Avatar
    Join Date
    Sep 2008
    Posts
    79
    Thank Post
    0
    Thanked 16 Times in 15 Posts
    Rep Power
    47
    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 02:14 PM.

  3. Thanks to SkywOrca from:

    CheeseDog (15th December 2009)

  4. #3
    CheeseDog's Avatar
    Join Date
    Jan 2006
    Location
    West Midlands
    Posts
    217
    Thank Post
    5
    Thanked 2 Times in 2 Posts
    Rep Power
    18
    Cheers, worked a treat.

    Do you have list of the functions you could send me?

  5. #4
    SkywOrca's Avatar
    Join Date
    Sep 2008
    Posts
    79
    Thank Post
    0
    Thanked 16 Times in 15 Posts
    Rep Power
    47
    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:
+ Post New Thread

Similar Threads

  1. generate a list of usernames in active directory
    By mrstephenw in forum Windows Server 2000/2003
    Replies: 6
    Last Post: 14th December 2009, 12:42 PM
  2. Replies: 13
    Last Post: 14th July 2009, 09:24 AM
  3. Usernames
    By Iain.Faulkner in forum How do you do....it?
    Replies: 38
    Last Post: 24th May 2009, 11:44 AM
  4. Auto generate timed keystrokes
    By sdc in forum Windows
    Replies: 5
    Last Post: 18th March 2009, 08:07 AM
  5. 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
  •