newId

Prev Next

Description

Creates and returns a new, globally unique identifier (GUID).


Input Parameters

Name Type Required Description
--- --- --- ---

Returns

Type: Text

Returns a new, globally unique identifier (GUID).


Examples

// generate and display a new, unique id in the debugger
var id = tools.newId();
debug.log(id);
JavaScript
// ai.suggest() requires a unique key as its 1st parameter
// we can use data.newId() to satisfy this requirement
ai.suggest(tools.newId(), "Testing", "Consider echo.");
JavaScript

Remarks

Programmers use unique identifiers all the time as a way to uniquely identify something. This function guarantees you will always receive a new, globally unique identifier (GUID) that won't collide with any other identifiers.

Use this function when you need a unique identifier for your own objects or are using another function that requires one.