Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I've had this requirement/question pop up a number of times in the past couples of weeks with a client.
For example:
Say we have a Customer listbox and a table.
The user would like to show the Customers in the exact or that has been selected.
Say Customer F is selected (holding down shift), then B and then E.
The table/chart should show it in this order.
But instead it just shows the default order.
Is there any function or trick to achieve this custom order within a table.
Any ideas would be appreciated.
Thank you
Hi
There is no easy way to do this. The model and the GetCurrentSelections() function return a list of selections, in the load order of the values and there is no way to change that.
These things are rarely impossible, but sometimes not worth the effort. This is what you would have to do:
You would have to write a VBScript Macro triggered by an OnSelect and an OnChange trigger for each field that must show this behaviour. The macro would have to work out what had been added/removed from the selections each time it runs and would have to update a set of sort order variables, one per field. The variables would contain an ordered list of selected values and the sort criteria in the (straight) table would be an expression using this variable.
You will need to find an API call (if it exists) that can switch the sort order of the table based on the last selection, otherwise the sort order will depend on the interactive sort order and will confuse the user. Or turn off interactive sorting.
Good luck
Jonathan