frappe.query_reports["Script Report"] = {
filters: [
{
fieldname:"purchase_order",
label: __("Purchase Order"),
fieldtype: "Link",
options: "Purchase Order",
},
{
fieldname:"purchaseorder",
label: __("PurchaseOrder"),
fieldtype: "Select",
options: function(x),
},
],
};
I am making a script report in ERPNext, where I have to use the first Filter's value and show an list of options in the second filter for the user to select. How can I refer to fieldname of the first JSON Oject in place of x in function(x)?
I searched erpnext and frappe documentation but couldn't find anything. I assume it is a javascript problem I am facing.