Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Partial Text filtering in a portal

Featured Replies

  • Newbies

Hello.

I've been struggling with this for days, reading everything I can but still not being able to pull this off. :qwery:

I'm creating a simple (or so I think) music collection database.

I have the following tables:

Songs - A list of all songs

Artists - A list of all artists

Albums - A list of all albums

AlbumTracks - A table containing a SongID, ArtistID and AlbumID (since the same song may occur on several albums, and be performed by different artists).

What I'm looking to do is to filter a portal of records in AlbumTracks based on a search string that could be a part of the song name (stored in Songs), the artist name (stored in Artists) or the album name (stored in Albums).

I've created four fields in AlbumTracks for this operation:

- searchableString (calc) - Songs::Name & " " & Albums::Name & " " & Artist::Name

- searchString (global) - where the user types in his search.

- searchResult (calc) - =If(PatternCount ( searchableString; SearchResult);1;0)

- positiveResult (calc) - =1

I'm then using a self join relationship (searchResult <-> positiveResult) to perform the search.

I'm guessing that the main problem is that since searchResult references a global field and searchableString (which itself references related tables) it can't be indexed.

Am I doing something conceptually wrong?

You can take a look at this sample file on JMO's site and see if you can implement the technique.

On your child table, you would need a Stored key of the three name fields sperated by the "¶".

  • Author
  • Newbies

Thank you John.

While that works, it has some serious limitations that if at all possible I would like to avoid:

1) It only works if the search string is a part of the beginning of the match. I want to find "hit me baby one more time" by searching "on" or "by", and not only by searching "hi".

2) Because of that, it requires three different search strings for each criteria (by name/by album/by artist)... I would like the same search string to find matches in all those fields - just like google or any search engine.

Am I asking for too much? (i miss SQL...)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.