Hi, everybody!
Given:
There is a detail with an editable grid
It is necessary to apply some filter to the records of the part reference field, but only if there are no records in another part (OrderProduct object) (for a specific Order)
Solution attempt:
An attribute with lookup List Config has been added to the details page:
<br />
"PrbProduct": {<br />
"dataValueType": Terrasoft.DataValueType.LOOKUP,<br />
"lookupListConfig": {<br />
"filters": [<br />
function() {<br />
var subFilterGroup = this.Terrasoft.createFilterGroup();<br />
subFilterGroup.addItem(this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "Order", this.$PrbOrder.value));<br />
var filterGroup = this.Terrasoft.createFilterGroup();<br />
filterGroup.logicalOperation = this.Terrasoft.LogicalOperatorType.OR;<br />
filterGroup.addItem(this.Terrasoft.createNotExistsFilter("[OrderProduct].Id", subFilterGroup));<br />
filterGroup.addItem(this.Terrasoft.createColumnFilterWithParameter("PrbOrder", this.$PrbOrder.value));<br />
return filterGroup;<br />
}<br />
]<br />
}<br />
},<br />
Problem:
It is not possible to find the correct path to the column in create Not Exists Filter. Or there is an error like "Column on the path [Order Product].Id was not found in the "Product" schema, or (with some other values) the filter does not work as needed.
Tell me, please, is it even possible to create Not Exists Filter/createExistsFilter without binding to the detail object?
How to correctly specify the "path to the column" in this case?