question

Pinakin K avatar image
0 Likes"
Pinakin K asked Pinakin K commented

Can I put "ORDER BY ASC" or "ORDER BY DESC" conditional?

In my application i want to make the order ascending or descending based on the condition at the pull. is it possible to do than in the Pull From List activity?
FlexSim 20.2.3
flexsim 20.2.3pull from listsql query
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jason Lightfoot avatar image
2 Likes"
Jason Lightfoot answered Pinakin K commented

I've done this using a decide activity sending a token to one of two pulls - one that does ASC, the other DESC - which is simple.

If you want it in a single pull activity you could ORDER BY myexpression ASC and have myexpression as an additional field on the list that is some value multiplied by a pullers label value (eg. ascmultiplier) which changes between 1 and -1 depending on whether you want ASC or DESC.

So the expression could be something like this:

  1. value.sortcriterion*puller.ascmultiplier
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.