- 1 text field
- VL_ascending (values: a,b,c)
- VL_descending (values: c, b, a)
- 2 named field objects on the layout for the same field. Object names : obj1, obj2
- obj1 has value list VL_ascending, obj2 has value list VL_descending
- 2 buttons performing a script A with a parameter ("obj1" or "obj2" )
- Go to object [ Get ( ScriptParameter ) ]
- Show custom dialog [ Get ( ActiveLayoutObjectName )]
- Sort Records by Field [ associated value list ] // or ascending, or descending - doesn't matter but more obvious with value list
- create some records with random values in text field (b,c,a,a,b,c…)
- button with parameter "obj1" should sort records ascending, button with parameter "obj2" should sort descending.
- Show custom dialog returns a correct result (the corresponding object is well selected)
- The sort is done on the first instance of the field on the layout, regardless of the active object.