exists
  • 02 Feb 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

exists

  • Dark
    Light
  • PDF

Article summary

Description

Returns whether or not a measurement is available.


Input Parameters

NameTypeRequiredDescription
nameTextYesTarget measurement name
[deviceId]TextNoSource IoT device identifier

Returns

Type: Boolean

Returns true if measurement value exists. Otherwise, false is returned.


Examples

// check if bpm measurement value is available
if (iot.exists("bpm") === true)
    debug.log("Measurement exists.");

Remarks

Use this function when you need to test if a measurement value is available.


What's Next