Scheduled Report Query

Scheduled Report Query

I have this scheduled workflow in Zoho Creator that emails a report named Stocks_Details which uses the Add_Stock form. In the report, I also added a field called Threshold from the Add_Product form and it's connected through the Product_Code field.

Now my problem is that I want to use Threshold in the filter for the emailed report like Stock_Onhand < Threshold but it won't let me and says the Threshold is not defined 

Here's a snippet of the deluge script in use:

sendmail
[
from :"sample_email"
to :"sample_email"
subject :"Restock Alert - " + zoho.currentdate.toString("yyyy-MM-dd")
message :"Please see attached file"
Attachments :view:Stocks_Detials[Stock_Onhand < 100] as csv
]