Hi Guys,
currently, I try to expand the work order list view (WorkOrdersListView.page) with additional functions.
For this, I added a counter (SimplePropertyCell) to this page and added a rule for the attribute "Value" to count all parts (work order components) for the current filtered list.
Right now, the code of the counter rule is analogue to the rule PartsCount.js and thus, if I initially enter the WorkOrdersListView.page, a query is built, but since my binding (clientAPI.getPageProxy().binding) is empty, I cannot extend my QueryBuilder with filters. Therefore, my result will always take all parts of all work orders and count them and if I navigate with the action PartsListViewNav.action, I will also see all parts of all work orders.
1. So my first question is, how I would access the information of my filter query in case I set a filter in the WorkOrdersListView.page. If I e.g. consider the method PartsCount.js, it is called, when entering WorkOrderDetails.page. As binding I have the information about the work order I selected from the list of WorkOrdersListView.page. These information can be used to build the QueryBuilder to filter for the parts of the currently selected work order. In my scenario, however, after calling the binding with clientAPI.getPageProxy().binding, I do not have any result. That is why I somehow have to access the query result of all work orders (workOrderId) to filter for their parts.
2. My second question would be, how I would trigger the recalculation of the counter in case I return to the screen after filtering the list of WorkOrdersListview.page. After debugging the code, I recognized, that the counter rule is only triggered for the initial loading of the screen, but the rule assigned to the attribute "Value" of the SimplePropertyCell, in which I set the counter, is never executed again. Is there a way to do that with the current version of the Asset Manager?
Thank you in advance for your answers!
BR,
Sher-Chan Kodirov