Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How To Use Portal To Filter Search...


This topic is 7495 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I remember seeing a tech note or publication somewhere demonstrating how to use a portal to show matching records for a search. It would display matches dynamically as data was entered into the search fields. I'm looking for a simple solution to search only first and last name and an identifier number, 3 or 4 fields. How is this done. I remeber the use of a repeating field with calculations for the data fields....

Posted

I'm not sure if this is what you're talking about, but I use a filtered portal to find people in one of my tables when making a relationship. For example, I have a table of students and a table of notes. If the user creates a new note and wants to relate it back to a specific student, he/she can search for the student via a portal, select the student, and then make the relationship.

In the Students table I have a simple calculation text field called StudentNameForFilter that breaks up the student's name. If his name is John Smith, the field looks like this:

J

Jo

Joh

John

...etc. It breaks up the name from left to right and also breaks up the last name, so the user can search using either the first or last name of the student. Finally, the last line of the filtered name field is the number "1" by itself. This field is a simple calculation using the Left function.

In the Notes table, I have a two global fields called StudentFilter and StudentFilterForLayout. StudentFilter is related to StudentNameForFilter in the Students table and is a calculation:

If(StudenFilterForLayout = "", "1", StudentFilterForLayout)

StudentFilterForLayout is where the user enters the name he/she wishes to filter. If this field is blank, all names are shown because StudentFilter will equal "1" and every StudentNameForFilter in the Students table contains a "1" as the last line of the field.

That's pretty much it. You can get creative with your filter calculation for improved searching. You can also generate the filter based on multiple fields. It all depends upon how you set up your calculations. The StudentNameForFilter field is a multi-line key. Another way to do this is with Waves In Motion's Portal Filter plugin. It offers more filtering options and and does not require you to write your own calculation for the StudentNameForFilter field.

I hope this helps. Good luck!

-Rob

--

Rob Wyatt

[email protected]

Posted

This looks exactly like what I'm looking for...I'm afraid however that you're a bit over my head. I would like to search by First Name, Last Name and ID Number. How do I split each of these up and what is a multi-line key ? If a record is John Smith 123456, can it be setup to find him when searching for just first, last or ID or all 3 at the same time...like J...,S...,12...?

Thanks...

This topic is 7495 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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