What I’m trying to do
When sorting a View in Bases for film / book titles I want to disregard the article. So for example “La Strada” sorts as “strada” or “The Great Gatsby” sorts on “great gatsby”. My films and books contain titles in more than five languages so there are quite some articles I want to drop.
Things I have tried
I could find no examples in the bases documentation or on this forum with the use of standard functions in bases. So it seems I have to write something specific for this purpose.
I wrote a simple function in Javascript that does what I want to do however I can find no way to call it in Bases. For example after I put my function in customJS, I tried:
formulas:
key: customJS.SortHelper.sortKey(file.name)
This does not work.
I also tried put the code in an anonymous function:
formulas:
key: ( () => { // Function Body...} )();
This does not work.
Is there any way to achieve what I want
or more in general, call a custom javascript function in a Bases formula ?