Do search based on first letter


I need some help with a Do search applied to a repeating group.

I have an application listing thousands of song titles with their performers and, on the home page, I have a repeating group that filters and sorts according to the choice made by the user with searchboxes, checkboxes and custom states.

Given the large number of titles, a user asked me if it was possible to filter by first letter. For example, if I chose “P”, only titles beginning with “P” would appear in the repeating group.
The problem is that I can’t modify the Do search in this way, you can’t truncate.

I’ve managed to filter to show only titles containing the chosen letter in uppercase, but there may be titles with this uppercase in the middle of the title, so it won’t be foolproof.

Has anyone tried this kind of filtering?

Thanks in advance.

For thousands of song titles I’d think that storing the first letter in a separate field would be best performance wise.

But wouldn’t users want to see all titles that have that letter for the initial character of any word?
for “The Best Song Ever” wouldn’t user’s expect B to retrieve that title in search?

:pensive: That’s what I thought, as well as for the performers, who are in a different data type from the titles, making it impossible to sort by them.

I’ve got my work cut out for me :laughing:

Thank you.

Not necessarily. Why not put the performer’s name as a text on titles as well?

Yes, that’s what I meant. Maybe I’ll create a temporary button so that it updates the title with its initial and performer. That’ll save me having to do it for all 4,500 titles :grin:

recursive WFs! (and then updating this new field at any endpoints that modify those fields OR a DB trigger)

Exactly! :wink:

This topic was automatically closed after 70 days. New replies are no longer allowed.