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.

Making a filtered portal show all records, truncation

Featured Replies

Hey everyone.

I put a filtered portal on a layout; in the global filter field the user can key in his search term and gets a list of appropriate records. Works great. Two questions:

1. I’d like to make it possible for the user to show all records. The only thing I can imagine at the moment is to put a separate button next to the filter field attached to a script like „show records from the not filtered table“ (= the one that is the basis for the self-join).

2. To make it possible for a user to key in just the first few letters of a record’s title (truncated, like in find mode), I set up my relational key to the filter field like

Left ( Title ; 1 ) & "¶" &

Left ( Title ; 2 ) & "¶" &

Left ( Title ; 3 ) & "¶" &

Left ( Title ; 4 ) & "¶" &

Left ( Title ; 5 ) & "¶" &

Left ( Title ; 6 ) & "¶" &

and so on...

So, when the users keys in fu he receives fully, also when typing in ful or full.

This works quite well, I just wonder: Is this really best practice? Seems to make my database quite large, as I have to go all the way to Left ( Title ; 40 ).

Thank you for your input.

Mike

Explode Strings / words... can work

http://www.briandunning.com/cf/36 or http://www.briandunning.com/cf/586

you can use a wild card * to show all records just code that in to the key field in the related table.

In your related table, create a calc field:

cTitle: "*" & ExplodedString ( Title )

Then in your interface table (where your portal is) a global field where they enter the text.

you can relate this to cTitle

If you type in a * it should show ALL Records. if you type in a few letters it should filter.

another option http://www.filemakermagazine.com/videos/power-filterting-for-portals.html

  • Author

Hey Stephen:

Thanks so much for pointing these out! Exactly what I was looking for.

I tried Matt Petroysky’s solution, and it works really good, without the additional load of calculated data.

As for the * and Matt’s solution, they don’t work together (at least not the way I tried it).

But I’ve found another way out for this. Given are these fields:

gSearchFieldStart (this is where the user keys in what he’s looking for)

gSearchFieldEnd = gSearchFieldStart & "zzzz" (the user cannot see this field)

and this self-relationship:

gSearchFieldStart <= Title

gSearchFieldEnd >= Title

So, if the user enters ca he’ll find for example cat, as this lies between ca and cazzzz.

What I found is that when you enter a letter followed by ¶ and then hit the Enter key, it returns all following records. So finds a list with all entries from a… to z…

Thanks again,

Mike

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.