query 50101 "ItemVarBalance API Query" { APIGroup = 'xxx'; APIPublisher = 'xxx'; Caption = 'Item Variant Balance API Query'; APIVersion = 'v1.0'; EntityName = 'itemVarBalancesQuery'; EntitySetName = 'itemVarBalanceQuery'; QueryType = API; elements { dataitem(Location; Location) { column(locationCode; Code) { } dataitem(Item_Variant; "Item Variant") { SqlJoinType = CrossJoin; column(itemNo; "Item No.") { } column(variantCode; Code) { } dataitem(Item; Item) { DataItemLink = "No." = Item_Variant."Item No."; filter(location_Filter; "Location Filter") { ColumnFilter = location_Filter = field(Location.Code); //<<---THIS IS THE FILTER THAT DOES NOT WORK } filter(Variant_Filter; "Variant Filter") { ColumnFilter = Variant_Filter = field(Item_Variant.Code); //<<---THIS IS THE FILTER THAT DOES NOT WORK } column(inventory; Inventory) { } column(qtyonSalesOrder; "Qty. on Sales Order") { } } } } } }
Answers
With a Query, I am trying to get the so called "available/sellable" quantity for each Variant per Location Code.