Skip to main content

Set Has

Check if a set contains an item

Written by Holly Conrad Smith

Use this to check whether something's already accounted for — for example, whether a usage name has already been assigned before applying a rule, or whether a given parcel ID is in your set of approved lots.

Set vs. List: a List (array) keeps items in order and can hold duplicates — you access items by position, like "the 3rd item." A Set has no order and no duplicates — adding an item that's already there does nothing, and there's no "position" to ask for. Sets are for asking "is this here?" and for comparing groups of things; Lists are for ordered, step-by-step sequences.

Category: Sets

Kind: Operation

Description: check if a set contains an item

Inputs

Name

Abbreviation

Type

Access

Description

set

S

Set

Item

the set to check

item

I

Any

Item

the item to check for

Outputs

Name

Abbreviation

Type

Access

Description

has

H

Boolean

Item

true if the set contains the item

How to

  1. Add the Set Has node.

  2. Feed in a set and the item to look for.

  3. The output is true or false — wire it into a Ternary If to branch your flow based on the result.

Did this answer your question?