1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
802 views
by aritra-k-6337 (400 points)
How to create a Random GUID in QIE?

2 Answers

+1 vote
 
Best answer

From the Code Wizard -> QIE System Functions -> Misc menu you can generate a UUID or GUID. 

var uuid = qie.getUUID(removeDashes*); 

The removeDashes option can be set to true or false to have the UUID generated with or without dashes.

by gary-t-8719 (15.1k points)
selected by rich-c-2789
0 votes
You can use the below function to create Random GUID (global unique identifier) using the below function:

function guid() {
  function s4() {
    return Math.floor((1 + Math.random()) * 0x10000)
      .toString(16)
      .toUpperCase()
      .substring(1);
  }
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
    s4() + '-' + s4() + s4() + s4();
}
by aritra-k-6337 (400 points)
...