Fabrice Nordmann

Sort Records by Field NOK with two objects for the same field

Discussion created by Fabrice Nordmann Expert on Oct 24, 2018
Latest reply on Oct 29, 2018 by TSGal




  • 1 text field


Value Lists:

  • 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" )



Script A:

  • 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…)


Expected result:

  • button with parameter "obj1" should sort records ascending, button with parameter "obj2" should sort descending.


Actual result:

  • 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.