Under Consideration

Sort a combo or a list in a descending order


Today, "sort by attribute" on a Combo or a list permis only ascending sort on the chosen attribute.

It will be helpful to have the choice between ascending or descending sort (for exemple, if the chose attribute is a date, to have the latest date first).

Comments (1)


Alternatives we are looking at.

Use scratch entities as a collection, that you insert data into via script. You need a bSelected bool attribute and an entity attribute for the FK of the entity you want to display. So basically two attributes in this scratch entity.

Then display as a table (grid) on your form. Make bSelected exclusive the first column, and subsequent columns are picked from within the FK.

So basically this table is a "Picker" - and tables (grids) you can choose a date field, and then ASC / DESC appears in the Advanced.

- - - - - - - - - - - - - - - - -

Method #2 - not fun...

Make an extra attribute field of type INT, that you set a value in that is basically 2^64-1 minus whatever INT value you want for your sort order. So if a date field for a combo - you convert the date to an INT, and do that big number minus the INT of your date.

You have to maintain this "calculated" field yourself within Bizagi, v11 is easier with the trigger.

Basically your INT field becomes smaller as time advances into the future.

If you want to use a string instead of a date(time) then you need to invent something similar, but it will be harder to implement. Stick to dates...