Pass method a script parameter for sorting

Hello,

In filemaker, I commonly wrote a generic sort function that would sort off of the script parameter passed to it.

For example, if the script parameter was “Name”, the list would sort by name.

How can I do something similar in Servoy? Is there a get(elementName) type function I can use?

Thanks,

Andrew

yes, that is possible.
Out of my head:

give the button a property-name: Name

method:

var test = application.getMethodTriggerElementName(); 
controller.sort(test)