Different orderData for ASC and DESC (same target)

Different orderData for ASC and DESC (same target)

gustav22gustav22 Posts: 1Questions: 1Answers: 0
edited November 2018 in Free community support

Hi all

Is it possible to have different orderData for ASC and DESC on the same target?
For example:
{ "orderSequence": [ "asc" ], "targets": [ 1 ], orderData: [ 6, 1 ]}
{ "orderSequence": [ "desc" ], "targets": [ 1 ], orderData: [ 7, 1 ]}

Goal:
ASC on Column 1 => orderData 6,1
DESC on Column 1 => orderData 7,1

Thanks
gustav

Answers

  • colincolin Posts: 15,166Questions: 1Answers: 2,588

    Hi @gustav ,

    It won't work that way, but you can hand craft it - see this example here. That was supposed to be a 5 minute job which turned into an hour - the complication is that if you sort by two columns, when you then sort by one, the direction doesn't necessarily change, hence why the code is a tad convoluted.

    That should work for you though, shout if not,

    Cheers,

    Colin

This discussion has been closed.