Portal Filter
am 20.10.2007 05:42:01 von bizouman_takethisout
Hi
I'm using a global field to create a filter for a relationship that will
display only the correct data in a portal, by script I change the global
field to change the contant of the portal.
That work fine, I have data type and the relationship is a "=" type... how
can I make a way to also display all the data, using the same portal and
layout setup
I want the user to be able to select to display, "service call",
"Installation", and "Maintenance" but how can I make a filter-relationship
that will diplay also all of them ??
Thank you
JF Fortier
Re: Portal Filter
am 20.10.2007 07:18:46 von Helpful Harry
In article , "JF"
wrote:
> Hi
>
> I'm using a global field to create a filter for a relationship that will
> display only the correct data in a portal, by script I change the global
> field to change the contant of the portal.
>
> That work fine, I have data type and the relationship is a "=" type... how
> can I make a way to also display all the data, using the same portal and
> layout setup
>
> I want the user to be able to select to display, "service call",
> "Installation", and "Maintenance" but how can I make a filter-relationship
> that will diplay also all of them ??
You need a "multi-key" field.
Change all the related records so that the Key field contains the
current data plus "All Records" (separated the two data items by a
carriage return).
eg.
Related Key field data
Record 1 Service Call
All Records
Record 2 Maintenance
All Records
Now when you change the Global field in the main table to "Maintenance"
Record 2 will be displayed, but if you change the Global to "All
Records" both Record 1 and Record 2 will be displayed.
There is a problem here if users are entering the data into the Key
field when creating new records. To get around this without needing
users to add "All Records" themselves, you could create an Auto-enter
field that adds this phrase and use this new field as the Key field for
the relationship.
eg.
NewKeyField Text, Auto-enter by calculation
= OriginalField & "{ret}" & "All Records"
where {ret} is the 'backwards P' carriage return character.
But this will create a secondary problem if users are allowed to edit
this original field. In newer versions of FileMaker you can set the
Auto-enter field to re-calculate itself, but in older ones you'll have
to have a button a script to change it.
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)