add unique to array

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

Field Selection Required

This block relies on a field that you select to perform its data actions. You must manually select the field you want to use in your flow using the field selector modal. To access the modal, click the white button on the block.

Field Selection Required

This block requires field selection (in). You must manually select the fields you want to work with using the field selector modal. To access the modal, click the white button on the block.

add unique to array v10.4.28

push any given type to the array if it doesn't already exist.

Out pins 1
  • mutations
    mutations

Emits a single array.add.unique mutation for the selected array field: the value is appended only if not already present. The value comes from the typed pins (value is stringified, dates become unix timestamps, number/date fields coerce to a number); with no value pin wired the mutation value is null.

A typical wiring for add unique to array: the mutations out pin feeds update document.

Studio canvas example for the add unique to array block: typical wiring for add unique to array.

Commonly used with

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

  • get guid: feeds into this block. Returns the guid (field: _meta.guid) of the given user.
  • update document: this block feeds into it. Update document in the given storage and creates a revision for it.
  • update multiple documents: this block feeds into it. Updates multiple documents in the given storage.
  • multiple: this block feeds into it. combine multiple mutations into one.
  • create: feeds into this block. Creates a new function that can be executed using the given name.
  • create document: feeds into this block. Creates a document in the given storage.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v10.4.28.


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