4

Is there a built-in function in KRL for generating a GUID of UUID (or something similar)?

Steve Nay
  • 2,819
  • 1
  • 30
  • 41
  • there is not yet a dedicated guid or uuid function, but there may be something that fits your needs. Do you have a particular format that you need? – TelegramSam Apr 20 '11 at 16:16

1 Answers1

4

I've created a module that wraps a webservice that might hold you over: UUID Module

Use like so:

ruleset a8x165 {
    meta {
        name "UUID Module Example"
        description <<
            Example use of the UUID Module
        >>
        author "Sam Curren"
        logging off
        use module a8x164 alias uuid
    }

    dispatch {}

    global {}

    rule first_rule {
        select when pageview ".*" setting ()
        pre {
            testuuid = uuid:new_uuid();
        }
        notify("Hello World", "This is a UUID: #{testuuid}");
    }
}
TelegramSam
  • 2,770
  • 1
  • 17
  • 22