Object list user-sorting

In workshop, there is the option to enable user-sorting, but it lets the user choose any property of the object type.

I’d like a way to limit the property options for the user, and let them sort only on the properties of my choice.

hey there
If you have access to the Learn.Palantir modules they show this process in the Deep Dives.

  1. Loop Layouts: If you are using a loop layout, you can apply property sorts to the object set being looped through. This allows you to control the order in which objects are displayed. You can achieve a custom sort by defining a static object set with the desired sort order in the object set definition

.
2. Custom Sorting Logic: For more advanced sorting requirements, consider using a function-backed object set variable to define custom sorting logic. This approach allows you to programmatically determine the sort order based on specific criteria or conditions.

What @Maverick outlined where you use functions to customize sort could be a valid user land workaround here. I’ve also added this signal to an internal ticket tracking the ability to customize the “Sort by” properties exposed to end users. Thanks for the signal here!

1 Like

This is not ideal, because if there are multiple Object Sets that represent the same values, but with different sorts, then it will make new components or features that are based on them to have duplicated logic, in order to support each sort’s view.
(hope that was clear).

This is a good idea, if the workshop wasn’t fetching the output objects asynchronously. I’ve tried to implement it before, but the order doesn’t seem to be right when it’s being run in workshop (unlike being run in the code repo preview, which then the sort works fine).

In case I’m right in these statements, are there any other suggestions?