Ah, one of the secret caveats and the holy grail of WFA 🙂
So here's one of the best kept and least known secrets of WFA:
You can actually extend SPECIFIC objects based on information returned in the filter.
Let me explain:
Let's say you use finder F1 with the basic filter "Find Volume by key" to fill up variable Vol1 => Vol1 will have regular volume fields
Let's assume a new filter "Volume with lun count" that looks like this:
SELECT volume.name, array.ip AS 'array.ip', count(lun.id) AS lun_count
FROM storage.volume
JOIN storage.array ON volume.array_id = array.id
LEFT JOIN storage.lun ON lun.volume_id = volume.id
GROUP BY volume.id
HAVING lun_count < ${max_luns}
That query is simple one, running on ALL the volumes in the cache, listing them,
and counting for each the numbers of luns each holds (Here under a certain maximum).
Note that the list is not bound by anything else.
Now lets create finder F2 with 2 filters:
1) Volume by key
2) Volume by lun count
The first filter returns a single result and the second a whole list.
Combined they would return a single volume object BUT with a twist:
An additional field holding the number of luns inside.
So if that variable is called Vol2 you can (and will) reference Vol2.lun_count
and have the current number of luns in it.
Do note that only variables filled by this new finder F2 will have that extra half-hidden field!!
Hope that was clear enough and gave you an idea how to proceed.
Best,
Yaron Haimsohn
OnCloud Team