# Advanced Query with Device: Get Node

**URL:** <https://forums.losant.com/t/advanced-query-with-device-get-node/4548>\
**Category:** Help\
**Tags:** workflow\
**Created:** [May 24, 2022, 1:40pm UTC](https://forums.losant.com/t/advanced-query-with-device-get-node/4548 "2022-05-24T13:40:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Calderon](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jonathan\_Calderon](https://forums.losant.com/u/Jonathan_Calderon)\
**Post date:** [May 24, 2022, 1:40pm UTC](https://forums.losant.com/t/advanced-query-with-device-get-node/4548/1 "2022-05-24T13:40:48Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [May 24, 2022, 2:26pm UTC](https://forums.losant.com/t/advanced-query-with-device-get-node/4548/2 "2022-05-24T14:26:28Z")

</div>

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](https://docs.losant.com/workflows/triggers/device/) 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](https://docs.losant.com/workflows/data/update-device/) 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.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Calderon](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jonathan\_Calderon](https://forums.losant.com/u/Jonathan_Calderon)\
**Post date:** [May 24, 2022, 2:33pm UTC](https://forums.losant.com/t/advanced-query-with-device-get-node/4548/3 "2022-05-24T14:33:07Z")

</div>

Thanks for the reply Brandon. I appreciated 🙂
