What is the relationship used to make your portal happen?
What filter expression, if any have you set up?
What kind of filtering do these buttons need to do? Can you give an example?
I made a 2nd instance of the original table. I don't have any filter expression set-up yet, no.
It's basically a list of clients, one filtering example would be if they have any active orders etc...
Thanks for your help.
I have a doubt why you want to filter the portal by button.
If that relationship means the occurance have stored and index field then no need to filter this .
if not then go for fixing it or take help of script.
Well there will be several different buttons, each with a different filter criteria. Cheers.
Ok Means you are trying to filter 1 tables record under different criteria... then
Take one global field on that table.Set its value on each button click.
In relationship make sure the global field must related with the the field that holda all the criteria value.
I think this will help you.
A more detailed description of what you want to do with the portal filtering will help us to help you.
Say you want to see a list of all clients with at least one order record where status = "active".
Set up these relationships:
Clients::gSelectedStatus X AllClients::Refresh
AllClients::ClientID = Orders::ClientID
Define Refresh to auto-enter Clients::gSelectedStatus
Use this filter expression:
IsEmpty ( Clients::gSelectedStatus ) or ValueCount ( FilterValues ( List ( Orders::Status ) ; AllClients::gSelectedStatus ) )
The IsEmpty clause will cause all records to show if gSelectedStatus is empty. The expression to the right of the Or operator pulls up a list of all order statuses for each client and returns the number of orders with a status matching the value in gSelectedStatus. Any value other than zero evaluates as True---causing that client record to be displayed in the portal.
Now your buttons can use set field to modify the value in gSelectedStatus to change what records appear in the filter or you can format gSelectedStatus with a value list and just select the status you want from the field's value list.
Note: Using the specific combination of match fields in the cartesian join, plus the refresh field with its auto-enter calculation is a technique posted here in the forum by Mark Gore that avoids the need for the Refresh Window [flush cached join results] step to get the portal to update after selecting a value in the global filter field.