find
  • 30 Oct 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

find

  • Dark
    Light
  • PDF

Article Summary

Description

Returns a specified app object.


Input Parameters

NameTypeRequiredDescription
tokenOrNameTextYesTarget object token or name

Returns

Type: Object

Returns an object that represents your app object.

Read-only properties on this object include:

NameTypeDescription
idTextReturns the id of the app object (i.e. 3)
tokenTextReturns the token of the app object (i.e. [3])
nameTextReturns the name of the app object
titleTextReturns the display title of the app object
typeTextReturns the type of the app object
hasValueBooleanReturns whether or not the app object currently has a value
valueAnyReturns the current value of the app object

Examples

// get app object using token syntax
debug.log(app.find("[10]"));

// get app object using name
debug.log(app.find("myName"));
// get app object [10]
var item = app.find("[10]");

// display a few object properties in the debugger
debug.log(item.token);
debug.log(item.name);
debug.log(item.type);
debug.log(item.value);

Remarks

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