How to add dynamic filter to ListView Dashlet

Hello. We have a custom module, called dim_pricelines that houses various alternative prices to be used instead of the listed price of a product. This of course is tied with foreign key -> primary key to ProductTemplates. Each product template can have N price alternatives. Now, I would like to use the ListView DASHLET so when a user opens up the Record View of a ProductTemplate, he can see all the alternate prices TIED TO THAT PARTICULAR PRODUCT. What the inbuilt ListView dashlet can do is just display ALL the prices, for all products. How can I dynamically filter out / restrict the listView dashlet to only display items that correspond to the selected product (technically the field product_id from dim_pricelines table must be equal to the GUID of the selected product)

Parents Reply Children
  • I do not have a subpanel, cause when I define one in studio, it creates a new field in dim_pricelines table(basically duplicating the info) and points to a third, associative table (even if it's not n => n but 1 => n) and the documentation to query joined tables from Javascript is very lacking. That is why I have preferred dashlet. I solved it by creating a dashlet from scratch and using loadData(..) function to manually query the module and send it to the HBS template. Initially I wanted to levarge filtering to the existing ListView dashlet