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

Determine first record in portal


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

Recommended Posts

Posted

Hi all,

I'm looking for a way to dynamically flag which record is the first in a portal.

I have a portal showing records from a related table.

I can sort the record in the portal.

Now I need to know which record is the first one after sorting, because I need that record showing up in an other portal.

In that portal I need to show all the records flagged as 'first'.

Any hint?

TIA

Posted

Sure.

One main table with general contact data.

A related table for all the types of addresses, work, home etc

A related table for all the telephone numbers, work,home...etc

I show the info of those tables on the main layout and there I can sort them.

The 'primary' address and telephone etc are the first row in each portaql.

So, if the home address is in the first portal row, that will be the primary address and should be used in all other places where the address of that contact is used.

When I change the order in the address portal, and another address becomes the first row, f.i. the work address, then that address should be used as primary address.

Now it is always the first entered address.

I need a way to flag the first record showed in the portal after sorting.

On a specific information layout I (want to) show all the primaries, address, phone, mail address etc.

As I said, now I always get the first entered data in the relate tables, because I don't know how to flag the records there as 'primary' after sorting the portals.

I saw it done somewhere, but don't know how to do it.

It is possible....

Posted

For display only, you could use a one-row portal, sorted the same way as the main portal, and place the address fields there.

Alternatively, you could sort the relationship instead of the portal - then the first address record is always the first one in the relationship's sort order.

However, this is not the best approach overall. Which address is "primary" is an attribute of the contact, not of the address. Instead of flagging a record as primary (which also necessitates unflagging the previous primary address, and can potentially result in more than one primary address), set a field in the Contacts table to the ID of the primary address.

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