Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Filtered/dual purpose portal


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

Recommended Posts

Posted

Hello

I have 2 portals on a tabbed layout based on a self-join between a table of booking records.

The first tab displays sub-sets of bookings according to Payment_Method "filtered" by a selection in a global field outside the portal. One Payment_Method is "credit card".

On the second tab I want to display records where Payment_Method="credit card" and where another field CCAuthCode=0.

Is there a way of doing this without creating another TO of the booking records.

Thanks

Paul

Posted

I think you'll need a new TO because you need a new relationship that includes a match on CCAuthCode. When you say it =0, do you mean empty? Since you can't build a relationship matching on empty, I'd create a flag field, flag_NeedsAuthCode = if ( isempty ( CCAuthCode); 1; 0). Then match a constant1 to this flag field as the second match in the relationship.

Posted

I am trying to avoid another TO because the fields displayed on the portal from the booking records include :B:Name fields from Company & Contact tables that also have to be duplicated if I recreate the Bookings table.

Since originally posting I did come up with the following. An additional calculated join field that takes the value of either CCAuth or "0" depending on which tab in the layout is at the front. The problem now is I don't know how to identify the front tab.

Posted

The CCAuthCode field is used to store a value for credit card authorisation. The field cannot be empty.

I want the second portal to display all records with Payment_Method="Credit Card" & CCAuthCode=0.

Posted

The CCAuthCode field is used to store a value for credit card authorisation. The field cannot be empty.

That still doesn't tell me which values it CAN contain, other than 0. In any case, you can do this with a single relationship (which also means a second portal is not really required). If you define a calculation field cAuthCode (result is Text) =

CCAuthCode & ¶ & "All"

and change the relationship to:

Bookings::gPaymentMethod = Bookings 2::PaymentMethod

AND

Bookings::gAuthCode = Bookings 2::cAuthCode

as long gPaymentMethod contains the value "credit card" and "gAuthCode" contains the value "All", the portal will show all bookings whose PaymentMethod is "credit card"; enter "0" into gAuthCode, and the portal will show only those whose CCAuthCode is 0.

If you like, you can toggle between "All" and "0" using buttons that simulate tabs.

Posted

Apologies, ccAuthCode contains numeric values representing the actual authorisation code given by a credit card company when processing a payment.

You solution worked a treat thanks.

Rather than manually toggling the All/0 global I was able to use

Case

(

GetLayoutObjectAttribute ( "InvTab" ; "isFrontTabPanel" ) ;"All" ;

GetLayoutObjectAttribute ( "CCTab" ; "isFrontTabPanel" );"0";

)

Do need 2 tabs/portals as they each display different fields.

This topic is 5792 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.