We can sort of list of [Product]s according to their [Category]. However which field of the [Categorie] thing is used for sorting ?
Idea 1 : When selecting [Catagory], be able to select one of its text, date or number field
Or
Idea 2 : Define in the Data settings the primary field used by defaut for sorting
Coming back to this, letting us define âDefault sorting Fieldâ would be great. I mean :
keeping the default sorting by creation date
when a Thing is âsort byâ another Thing, use this last defaut sorting field. So in my previous exemple, when I do a search for [Product] defined by [Category], the Categoryâ s defaut sorting field would be used to sort the products.
You can already do this with Sort by: âDynamic Fieldâ âŚthen you can pick whatever you want BUT you cant reference the thing you just searched for (dumb), so instead you have to duplicate the search criteria from the main search⌠then it works. Seems a bit hack-ish, but does the job.
They could add âThis thingâ as an option to the dynamic sort field, thatâd make it less confusing to set up. I think the way you originally suggested would be too big of a change for them to do, but this way should be pretty easy to add (i assume).
Generally, itâd be good if they added the âAdvancedâ option to ALL dynamic inputs. Itâs a super useful feature of the :filtered option, coz itâs so freeing, but doesnât seem to be available anywhere else. Iâd like to see that option at the bottom of literally every dynamic inputâs list of options.
Well yeah, i suppose doing 2 searches the same would theoretically take twice as long. But actual load time⌠depends how it handles the searches. Unless the database is huge it should still be pretty fast⌠and at least a temporary workaround until they can solve properly as below.
Indeed, as i said, the BEST way they could fix it is to add âThis Thingâ as an option to the dynamic sort field. That would take away the need for the 2nd search and would perfectly solve the problem right? It shouldnât add any processing time.
Possibly the field chosen in Data > App Data > Primary fields would be used for sorting, sorry too tired to test it right now. Unfortunately it is not changeable at runtime for different sort orders.
I find that if I need to reference an item or list of Data in more than one spot on a single page that it is usually best to create a group or repeating group somewhere on the page that does the search and then you can reference the group instead of performing another search. Make the group or repeating group 1x1 pixels and a clear background to not show up, as I think (canât quite remember) that it has to be visible on page load to actually do the search
This way the search is performed only once on page load which should help with the speed
I thought also about it. Primary fields seem use for the âapp dataâ visualisation only.
In the App Data > Data, a defaut sorting field would be best. But in my app, the sorting fieldâs field can be different from one page to another.
Adding to this discussion, Iâm wondering if it is possible to sort on a Thingâs Thing dynamically.
I put the field name in a custom state that I use to sort dynamically. This works perfectly, but only â1 levelâ deep. If I want to reference a Thing on the Thing I reference in the RG, the sort doesnât work. With one data type I just added another two fields with a copy of the referenced Thingâs data as text to help sort the RG but with others this wonât be that easy and it also kind of beats the point of having data across multiple data types.
How does the dynamic field sort work? It takes the name of the field but what if it is not /name but /Thing/name ?
Bump - I need this functionality too. The ability to sort a repeating group on a thingâs thing would be super helpful.
The use case: I want my users to be able to sort their tables based on the data in related things of the thing the table consists of. At the moment, they can sort on the fields in the table that are direct fields in the thing, but not linked things.
eg. A PurchaseOrder (thing A) has a Vendor (thing B), and I want to sort the table based on the name of the Vendor. I am not going to put a Vendor name as a text field on the purchase order, as itâs redundant and already stored in the linked Vendor thing.
Thanks for the suggestions - Iâm currently using DragTablePlus plugin to neatly present the tables and will see how to integrate these suggestions with the plugin