Sidebar

Random GUID Creation

0 votes
572 views
asked Feb 19, 2018 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.

answered Feb 20, 2018 by gary-t-8719 (14,860 points)
selected Feb 20, 2018 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();
}
answered Feb 19, 2018 by aritra-k-6337 (400 points)
...