f



Filtering data in a portal

I'm trying to show a subset of the data displayed in a portal.

This is the current set up (filemaker 6.0):

I have a file called Master that contains information about clients.

I have a file called Jobs which contains, you guessed it, information
about jobs. This file is linked to the Master file by Client ID.

The Jobs file contains a text field called "type" which identifies each
record as either a "Job" or a "Quote"

I have a portal on the Master file that displays all the related Job
records for a particular client including both  "jobs" and "quotes".

I WOULD LIKE TO HAVE a set of three radio buttons above the portal that
allow me to limit the display to showing "all" records, just the
"quotes" and just the "jobs"

As a bonus I'd also like to be able to sum the field called "Amount"
from each record and get a total amount that reflects each of the three
displays.

Any help would be much appreciated

Thanks

Justin

0
justin (3)
12/11/2005 6:07:57 AM
comp.databases.filemaker 11000 articles. 0 followers. amosw01 (46) is leader. Post Follow

3 Replies
362 Views

Similar Articles

[PageSpeed] 8

justin wrote:

> I'm trying to show a subset of the data displayed in a portal.
> 
> This is the current set up (filemaker 6.0):
> 
> I have a file called Master that contains information about clients.
> 
> I have a file called Jobs which contains, you guessed it, information
> about jobs. This file is linked to the Master file by Client ID.
> 
> The Jobs file contains a text field called "type" which identifies
> each record as either a "Job" or a "Quote"
> 
> I have a portal on the Master file that displays all the related Job
> records for a particular client including both  "jobs" and "quotes".
> 
> I WOULD LIKE TO HAVE a set of three radio buttons above the portal
> that allow me to limit the display to showing "all" records, just the
> "quotes" and just the "jobs"
> 
> As a bonus I'd also like to be able to sum the field called "Amount"
> from each record and get a total amount that reflects each of the
> three displays.
> 
> Any help would be much appreciated
> 
> Thanks
> 
> Justin

If you format the field as "Jobs" and "Quotes" checkboxes instead of
radio Buttons, you'll find that the relationship will match however
many boxes are checked.

You'll have to check both Jobs and Quotes to get All, but it would be
simple to script a button to do that for you.

The idea is that when multiple checkboxes are selected, the actual text
value of the field is a return-separated list, and the realtionship
sees them all as matching values.

So, for instance, if you had both Jobs and Quotes selected, the actual
field value (if you were to simply display it as a text field) would be

Jobs
Quotes

and all would be displayed.

Matt
0
Matt
12/11/2005 12:24:35 PM
Hi Matt:

That's a great suggestions, thanks. I'm not sure though how to work the
relationships so this filters the data that's already shown in the
portal.

The relationship that currently defines the portal is based on Client
ID. How do I  get it to ALSO match a relationship with the results of
the check boxes you describe?

Thanks.

J.

0
justin
12/11/2005 5:58:39 PM
justin wrote:

> Hi Matt:
> 
> That's a great suggestions, thanks. I'm not sure though how to work
> the relationships so this filters the data that's already shown in the
> portal.
> 
> The relationship that currently defines the portal is based on Client
> ID. How do I  get it to ALSO match a relationship with the results of
> the check boxes you describe?
> 
> Thanks.
> 
> J.

First, look at what you have in the child records that identifies each
as either a Job or a Quote. You need a single field that specifically
identifies each record (e.g., Type) with a J or a Q (or, "Job" and
"Quote", it's up to you). Populate the fields accordingly.

Make a Type field in the parent (Client or Account) table. Define the
field as a checkbox set on the layout, taking its values from a value
list which you've defined as having a "J" and a "Q" (or "Job" and
"Quote") as its values.

Don't worry about the checkbox value choices displayed on the layout.
They can always be covered with something else.

Now go to your Relationship Graph, and connect the Type fields in the
two tables using the same table occurrences that define the existing
relationship.

What you've done is create a multiple criteria relationship, requiring
that the records displayed in the portal have both ClientID and Type as
matches. In Browse Mode, the portal will display that client's Jobs or
Quotes, depending on which box is checked. Bear in mind that you now
must have either or both boxes checked in the parent record, or nothing
at all will display in the portal.

For a display of all records, you can either select both boxes
manually, or do a script:

Set Field [ Clients::Type ; "JParQ" ] 
or 
Set Field [ Clients::Type ; "JobParQuote" ]

That "Par" is intended to be a Paragraph sign, otherwise known as a
"pilcrow" (or, much less commonly, "alinea") which you can select from
the symbols in the Set Field dialog. Put a button on the layout to run
the script.

Hope all that's clear enough.

Matt
0
Matt
12/11/2005 11:29:16 PM
Reply: