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

    exists

    • Dark
    • 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.");
    JavaScript

    Remarks

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


    What's Next