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

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

Recommended Posts

Posted

Hi all,

I have a quick portal sorting question.

I have have three related tables: People--<JoinPeopleGroups>--Groups

I have a portal in a layout based on the Group table, that uses the "JoinPeopleGroups" table occurrence. The fields in the portal contains the names and some other information from the related People table. I wanted to sort the records in the portal alphabetically by name, but when I check the sort portal records in the Portal Setup Dialog, it only gives me the fields from the "JoinPeopleGroups" table. I found that if I temporarily point the portal to the People table, I can add the First and Last Name fields to the sort order, and that they stay in effect after I have pointed the portal back to the "JoinPeopleGroups" table. Is this a feature that I had missed before or is it something that is unreliable?

Thanks in advance!

Posted

Hi all,

I have a quick portal sorting question.

I have have three related tables: People--<JoinPeopleGroups>--Groups

I have a portal in a layout based on the Group table, that uses the "JoinPeopleGroups" table occurrence. The fields in the portal contains the names and some other information from the related People table. I wanted to sort the records in the portal alphabetically by name, but when I check the sort portal records in the Portal Setup Dialog, it only gives me the fields from the "JoinPeopleGroups" table. I found that if I temporarily point the portal to the People table, I can add the First and Last Name fields to the sort order, and that they stay in effect after I have pointed the portal back to the "JoinPeopleGroups" table. Is this a feature that I had missed before or is it something that is unreliable?

Thanks in advance!

Do you need the middle table? Maybe you only need another table occurrence that just links people and groups

Posted

Valdrin,

That is a bit of a trick, changing the context for the portal to see a related table occurrence and then back. I don't think it'll break. Another approach is to define the fields you want to sort by as calc fields in the join table, that is Join::NameLastFirst_c.

Do you need the middle table? Maybe you only need another table occurrence that just links people and groups

Yes, he needs the join if a person can belong to many groups, and a group consists of more than one person.

Posted

Valdrin,

That is a bit of a trick, changing the context for the portal to see a related table occurrence and then back. I don't think it'll break. Another approach is to define the fields you want to sort by as calc fields in the join table, that is Join::NameLastFirst_c.

Yes, he needs the join if a person can belong to many groups, and a group consists of more than one person.

Adding a field to sort by to the join table is what I've always done in the past. I discovered the pointing at a related table occurrence and back thing by accident. I was playing around looking at different ways to sort the data in the portal before creating the sort field in the join table, when I discovered that the sort fields "stuck" when I switched between related table occurrences.

I could not find any documentation that mentioned being able to do this, so I did not know if it was a bug that might break something, or if it was a feature that I just did not know about.

Posted

Not exactly a bug or a feature, I'd just call it a behavior. Kevin Frank wrote an article about it.

Thanks, I was searching the net for anything on this and came up empty. It was an interesting article. In a reply Tom Fitch said that sorting a portal by "foreign fields" causes a performance hit. I wonder how much slower it is than sorting on a calculation field in the join table...

Posted

Yes I made that remark. I have only my own recollection, but in at least a couple of projects I've worked on, mysterious delays turned out to be due to some portals that had been copy/pasted, then pointed to a different table occurrence, but the sort was left pointing to the old fields. What I'm unsure about is if the old fields were not just from a different table occurrence, but were they unrelated or perhaps unknown. The performance difference was like night and day.

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