RE: Flowfield and CalcFormula
I think you can do it in this way (a bit awkward way but it should work)
1. Add a new field in the table.
2. Write the same function GetAvailableQty that returns the value you need.
3. Write an additional function in the separate codeunit and call it something like UpdateAvailableQtyAllItems.
In this function you can iterate through all the items, call the GetAvailableQty function and assign the result to the new field:
If Item.FINDSET then
REPEAT
Item."New Field" := Item.GetAvailableQty;
Item.Modify;
UNTIL Item.Next = 0;
4. Add an action to the Item List so every user can press and update the value in this field. When user press it, the function UpdateAvailableQtyAllItems will be called.
In this case you have a field, it is shown on the page and you can make filters. I'd not recommend to call this function to OnOpenPage trigger of ItemList page due to performance reason.