Choose where you’d like to start

distinct

Overview

The distinct function returns the unique values (from key value pairs), or unique elements, present in a collection.

Return Type

  • LIST

Syntax

<variable> = <collectionVariable>.distinct();

where,

ParameterData typeDescription
<variable>LISTVariable which will hold the returned list.
<collectionVariable>COLLECTION

The variable from which the unique values or unique elements will be returned.

Examples

 productVersion = collection("Creator" : 5, "CRM" : 2, "Mail" : 5);
 info productVersion.distinct( ); // Returns 5, 2
 products = collection("Creator", "CRM", "CRM");
 info products.distinct( ); // Returns "Creator", "CRM"

Get Started Now

Execute