Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Calculating Portal Row Count & Separation Model


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

Recommended Posts

  • Newbies
Posted

Hi,

I have a question about calculating portal row count while also trying to adhere to the data separation model.

My understanding of TSM is probably shakey, but when calculations are for interface purposes, one should try to keep them out of the data files and in the interface file. Is that correct?

I have a situation where I have a contacts layout in an interface file that is based on a TO of the contacts table (in a separate data file). On this layout I have a portal which displays related "letters" that have been written to the contact.

Above the portal I'd like to display the count of letters written to the contact. However, I'd like to avoid having the calculation field in the letters table.

So far I haven't been able to find a way to have the calculation field stored in a table in the interface file and display the count of letters related to the contact. Is it possible?

So far, my TOG for this looks like:

Contact ----< Letter x UI

where contact and letter are tables in separate data files and UI is a table in my interface file.

Contact and letter tables are related on a Contact_ID primary key and a Letter_to_Contact_ID foreign key. I then have the Letter and UI tables related by a cartesian multiplication based on a "universal join field" (basically a field in each which has a value of "1").

As I expected the calculation field for the portal count of letters (the calc is UI::portal_count = count (letter::letter_ID)) on the contact layout displays the total number of records in the letters table, not the number of related letter records displayed in the portal

I'm stumped on how to create a TOG or the relationships to be able to have the calculation of the total count of portal records reside in the UI table.

Maybe I'm being too strict in my interpretation of

the separation model, but I'd don't consider a portal count to be true data, more a temporary interface element.

Thanks for your help and insights!

Posted

It's not practical to do a "pure" separation of data and UI in FileMaker. Just make the calc in the Contacts table.

Posted

You could also use a summary field in the Letters table. This would provide the correct count over any relationship you have (or might have in the future), in addition to counts in reports produced directly within the table.

Note: Since version 7, you can define a Cartesian product relationship by using the x relational operator. The "constant1" method is obsolete.

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