3 Replies Latest reply on Mar 6, 2010 10:48 AM by dmpjporter

Filtering a range of letter (A thru M) using portal and relationship.

Title

Filtering a range of letter (A thru M) using portal and relationship.

Post

I've been working on this little homemade project now for a few months, and every day I get another whiz bang idea that usually leads to me staring at a screen full of scripts until my eyes hurt. I have been able to solve most of them on my own and others with the help from this forum, so I am going to try a life line again.

I have a detailed Client layout that shows every detail of a client and I was trying to think of the bext way to navigate the clients and decided to use a portal on the layout to select the clients from and have the details show up in the detailed layout. I have used this method now for a few areas of the project and it has worked great. Now, the good idea fairy has been hanging out at my house and said, "How about we put in a tabbed panel with say, 3 or 4 tabs, each with a letter range and have each portal in that panel how only that range."

Currently, I have a calculated field that only shows the left letter of the last name, I am trying to use an IF - Else if statement to figure out which tab has been pushed. I would like to use Set Field to insert a text range into the global field to show a range of records.

Any ideas?

Thanks.

Dave

• 1. Re: Filtering a range of letter (A thru M) using portal and relationship.

You will need to create three relationships which filter the portals accordingly.  There are two ways of creating relationships based upon alpha ranges:  use a multiline calculation of each letter or use comparative operators.  I've create a sample which shows both ways.

The multiline multiline example creates calcs tab1, tab2 and tab3.  I placed them inside tab panels.  The second example uses comparative operators (the calculations are i and r).

Relationship on alpha range

• 2. Re: Filtering a range of letter (A thru M) using portal and relationship.

This is perfect, thanks. I found something similar in a book, but it really did not explain it as weill.

Thank you again.

Dave

• 3. Re: Filtering a range of letter (A thru M) using portal and relationship.

I just wanted to add something that I did, which seems to have replaced the need to create the extra calc fields and relationships.

I have the Clients Table with a self-join to show all records with a global text field that I have joined as well. Whatever I put into the text field appears in the list, A shows only A names, etc. Instead of adding the calc fields and relationships, I used what i currently had and just created a script that runs when I click one of the tabs. I use an If Else If statement to see what tab is in front, depending on which one is selected, I have the script fill in the global text field with a range of letters, ie. "a¶b¶c¶d¶e¶f¶g¶h". Then the portal only shows that range, and each tab has a different range.

I would not have figured this out without the example you posted, I appreciate it.

Dave