I would like an option that when a text sort is used it can also not include the definite article. E.G. instead of putting the text ‘The King’s Speech’ under T it is put under K. Any example of this is the artist list in the ipod app of an iphone etc
Hi,
I am just using the built-in SQLite sorting functions. I don’t believe they support this kind of sorting, but I’ll look into it. No guarantees though.
Thanks,
Brendan
Hi,
Since the last post, is there any development regarding the sorting without the definite article.
Thanks
Hi Izzy,
Since 2011 I’ve added many new features to Tap Forms (the original post year). One thing you can do now is you can add a Script field which can process the value from another field in your form to do some manipulation of the values.
So you could write a small script that removes any occurrence of the word “The” in the movie, book, or song title and returns that in the Script field. Then you can sort your records on the Script field values.
Here’s a script that will do just that:
var movie_title = record.getFieldValue('fld-987c9aac738a4f0fa1d18395902b3fb1');
if (movie_title.startsWith('The ')) {
movie_title.replace('The ', '');
} else {
movie_title;
}
So it will search for the first occurrence of ‘The ‘ and replace it with nothing, effectively removing it. And the if statement checks to make sure it only does that if ‘The ‘ appears at the beginning of the movie title.
Hope that helps!
Brendan
Hi Brendan,
Thank you for your quick and exhaustive answer.
I was able to add your example in my field by adding some modifications because I had more conditions. I still look for one or two solutions of display but the result already suits me.
Thanks for your help.