View Single Post
Old 01-09-2023, 02:31 AM   #468
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,090
Karma: 76037135
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Is there a function that sorts a list into a user-defined order?

Context: I have a text column that may return results in a list-string like "foo, bar, foo, foo, foobar."

Using Action Chains, I'd like to:
a) Sort the entries in a user-defined order (e.g. "foobar, bar, foo, foo, foo)
b) Select the first item of this sorted list

And then replace the string with that.

(Additional context: When FanFicFare downloads an anthology of multiple fics, it concenates all the ratings into an unsorted string like "General Audiences, Mature Audiences, Explicit, Teen and Up Audiences, Not Rated." In order, I want to pick the first of Explicit > Mature > Teen > General > Not Rated.)

edit: can I check just one column with a first_non_empty?

Last edited by ownedbycats; 01-09-2023 at 03:13 AM.
ownedbycats is offline   Reply With Quote