Advanced Query with Device: Get Node

Hi Losant Team!

I want to know if with an advanced query I can filter attributes with null value.
For example, I have devices with a “Flow” attribute, but some devices have a value and some don’t.
Is it possible ?

Thanks :slight_smile:

Hey @Jonathan_Calderon,

There is currently not a way to filter devices by attribute value - either by having a specific value, or in your case, having never received a value.

The best workaround I can think of is to use a tag. I would recommend all devices start with a tag to indicate the attribute has not yet received a value. Maybe flow=notReported. In a workflow, using the Device: State Trigger filtered by the Flow attribute, I would check the current value of the flow tag to see if it needs updated. Devices tags are added to the payload automatically by the Device: State Trigger. If flow === notReported, use a Device: Update Node to change the tag value to reported.

This will result in the device tag only ever being changed once and then you can filter on the value of the flow tag to find devices that have received a value for that attribute.

Thanks for the reply Brandon. I appreciated :slight_smile: