Hi everyone,
I’m trying to set up a Condition operation in a Directus Flow. My goal is to check a value from the result of a previous “Read Data” operation.
Here’s the scenario:
- I have a “Read Data” operation (let’s call its Operation Key
get_goods_item_data
). - This operation returns an array of objects, like this:
[
{
"id": 45120,
"sort": null,
"user_created": "2e818224-7e3f-4b63-a65d-3672a83379a6",
"date_created": "2025-07-05T05:14:23.700Z",
"user_updated": "2e818224-7e3f-4b63-a65d-3672a83379a6",
"date_updated": "2025-07-08T15:00:15.962Z",
"article": "117662059012",
"catalog_id": 4223,
"selling_price": "12054",
"price_rrp": "9220",
"supplier_price": "7678",
"ozon_id": "2152960947", // This is the field I want to check
"shinservice_order_goods": [],
"goods_stock": [
64663,
64664,
64665
]
}
]```
In the subsequent "Condition" operation, I want to check if the ozon_id field of the first item in this array is not null and not an empty string.
I've tried using rules like these:
{
“get_goods_item_data”: {
“0”: {
“ozon_id”: {
“_nnull”: true,
“_neq”: “”
}
}
}
}```
And even with _nempty:
{
"get_goods_item_data": {
"0": {
"ozon_id": {
"_nnull": true,
"_neq": ""
}
},
"_nempty": true
}
}
Both of these result in the error: "Validation failed for field \"get_goods_item_data\". Value is required."
What is the correct way to reference the get_goods_item_data
result (which is an array) and then check a specific field (ozon_id
) within its first element (0
)? Am I using the correct path to access the operation’s output?
Any guidance would be greatly appreciated! Thanks!