New topic Closed topic
avatar image
2
Order by expression?
By Created , last editted

Long story short: Is there a way to sort a collection by expression, when creating a object variable?


Short story long: I am trying to minimize development time by reusing an action for a very similar task; calculating costs for a route. If i can use a checkbox expression to indicate if the action has to calculate de planned costs or te actual costs, I can use the same action. 


When the route is planned, the locations for that route will get an order number; ie: 1, 2, 3.  1 for first location, 2 for second location and so on. It might happen that the actual order of visited locations is changed during the day. For example, location 1 is not open yet, so the employee will visit location 2 first and will go to location 1 afterwards. In that case, "planned_order" will be different from "actual_order" and ''actual_order" needs to be used to order the collection.


Long story short: Is there a way to sort a collection by expression, when creating a object variable?


Short story long: I am trying to minimize development time by reusing an action for a very similar task; calculating costs for a route. If i can use a checkbox expression to indicate if the action has to calculate de planned costs or te actual costs, I can use the same action. 


When the route is planned, the locations for that route will get an order number; ie: 1, 2, 3.  1 for first location, 2 for second location and so on. It might happen that the actual order of visited locations is changed during the day. For example, location 1 is not open yet, so the employee will visit location 2 first and will go to location 1 afterwards. In that case, "planned_order" will be different from "actual_order" and ''actual_order" needs to be used to order the collection.

Answers
Sort by:

This topic is closed.