Right now the only way to do this is to hardcode the TableSort text value, e.g. "TableA.Column1 DESC". It would be nice to set this up somewhere in the Table widget properties.
"TableA.Column1 DESC"
Hi Emma,
I don't see the big improvement here, when you scaffold an entity to a list screen, there is the TableSort local variable, just set the default value there.
The improvement would be having a real reference to the Entity/Structure attribute instead of hardcoding the names, e.g. not needing to worry about renames to the referenced Entity, Structure, or Attribute name.
Ah that makes sense indeed
Liked the idea
Just wrote an article about sorting, that resulted in this conclusion, and was about to add the idea, when I found yours.
"Ideally, I would like to be able to just tell the Table Widget what the default sort column is. The platform can then take care of setting the right value in the TableSort variable for it’s first fetch and setting the right header’s sorted class.
There are several ways to do this, I’m not picky, here’s just one suggestion :
An extra property on the Header Cell of a Table Widget below the Sort Attribute. Only if a user chooses a value for “Sort Attribute” it is editable. Default is No, you can set only one per table to either Ascending or Descending, if more then Service Studio gives a Warning."