generate shortid

This block is part of the value group and was last modified in core v10.4.28.

generate shortid v10.4.28

In pins 1
  • length
    number

    length of a short-id returned, lowering increases the collisions probability.

    Default 21

Out pins 1
  • shortid
    value

Generates a crypto-random id from the FIXED 64-character nanoid alphabet (0-9, A-Z, a-z, hyphen, underscore); length defaults to 21. The alphabet is not configurable -- use value_random_string for custom alphabets. A new id on every execution.

shortid
nanoid

A typical wiring for generate shortid: number feeds the length pin; the shortid out pin feeds set.

Studio canvas example for the generate shortid block: typical wiring for generate shortid.

Commonly used with

In production blueprints, this block is most often wired together with:

  • set: this block feeds into it. Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type.
  • number: feeds into this block. Generates a valid number from the filled custom value in the blueprint.
  • new object: this block feeds into it. Builds a new object filled with the given fields.
  • sha1: this block feeds into it.

Version history

Introduced in v10.4.28.


Back to value Return to the main group to view all sub-groups Back to value Return to the group to view all blocks within this group