Trigger ListPage Interaction class when Combobox selection changes AX 2012


I have a requirement to filter the records in a listpage depending on a Combobox filter. The combobox changes the datasource query with a complex statement, which is the reason I can’t use the properties on the Control itself. My solution now would only need the interaction class to trigger when my selection on the Combobox changes. I know that the method selectionChanged() on the interaction class gets called each time my selection on the record changes, but that’s not exactly what I’m looking for and I really don’t want to use that, since the user would always have to click on another record before the query changes…

So, is there any way I could trigger the interaction class through my form control?

Hi, I also have this case.

Anyone, suggest a solution.

Hi Mohamed,

I never found a solution for this, but we came to the conclusion that it’s not optimal to filter on a listpage since it’s suppose to only display information. Rather than filter on the listpage, you can implement the filter on the Details form. Another option would be to create new queries with the filtered data for each option you need and use them in a new listpage (this is how Microsoft does it).

Kind regards

hi AnonX,

I have the solution to add the combobox filter to the list page,

Just, change the ‘DisplayTarget’ property of the ‘Group:Filter’ in Design to ‘Client’.

Now the methods in the combobox can be override,

e.g., use modified() to change the query of the DataSource and call executeQuery().

No need to use interaction class for this case.

… with the consequence that filters won’t be available on Enterprise Portal.

Hi Mohamed,

I knew that option, but what Martin said is exactly the case why that solution wasn’t an option for me :slight_smile:

Hi, I’m having exactly the same problem as the OP (except we don’t use the EP in AX 2012 R3). Now with planned demise of EP in AX 7, just how relevant is the DisplayTarget property going to be in the future?

It’s not applicable in AX 7, because both the old client and Enterprise Portal have been replaced with the new web-based client.

You may want to get an AX 7 environment and look at it by yourself, because it’s not something in future - it’s already here.