selected
  • 17 May 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

selected

  • Dark
    Light
  • PDF

Article Summary

Description

Returns whether or not the specified app object has a valid value.

Checking for specific values within multi-value app objects is also supported.


Input Parameters

NameTypeRequiredDescription
tokenOrNameTextYesApp object token or name

Returns

Type: Boolean

Returns whether or not the specified app object has a valid value.


Examples

// check if object [10] is selected
if (app.selected("[10]") === true)
    debug.log("Selected!");
// check if multi-value object [10] has value 'ABC' selected
if (app.selected("[10|ABC]") === true)
    debug.log("Selected!");

Remarks

This function is useful if you need to test whether or not an app object has a valid value.

Checking for specific values within multi-value app objects is also supported.

Token Syntax

This function uses the native app object token syntax, which refers to the ID of an object within your app that is enclosed in square brackets.

Example: [10]


What's Next