Jump to content

# Adding a dimension to portals

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

## Recommended Posts

I had once seen someone, someplace, attempt to explain what I am asking, but it didn't register with me at the time, and I have not found it since. I have data I want to view in a portal such that records 1 through 3 are across the first portal row, then records 4 through 6 are in the second row, etc.

I realize I could probably do something with the related records that would get their sequential number, divide by three and then set it up so the first row would display data from two tables away, but FileMaker says to avoid this. In this case, I think I would have to set up the portal to display records from the child table, then place values from three different grandchild tables based upon the modulo of the division (modulo 1, modulo 2, modulo 0, then on to next row). The second problem here is working out how to assign them to the proper rows such that the proper row is 1 + Floor (n/3).

I have a value list I can use for sorting the related records properly before the division, so that is not a problem.

Can something like that work? I would include a graphic, but I have not even gotten something to fail elegantly enough to produce one that is meaningful.

##### Share on other sites

30 minutes ago, AndrewPurvis said:

I have data I want to view in a portal such that records 1 through 3 are across the first portal row, then records 4 through 6 are in the second row, etc.

Since a portal row will only display a single related record, you must use three side-by-side portals for this. And - assuming the number of related  records is reasonable - you can use portal filtering to make each column display only records whose position in the related set modulo 3 corresponds to the column number.

The filtering expression is a bit complicated, since there is no function that would return the position of a record in the related set directly, so try =

```Let ( [
indexValues = List ( Child::ChildID ) ;
index = ValueCount ( Left ( indexValues ; Position ( ¶ & indexValues & ¶ ; ¶ & Child::ChildID & ¶ ; 1 ; 1 ) ) )
] ;
Mod ( index - 1 ; 3 ) + 1 = 2
)```

This is for column #2 out of 3.

##### Share on other sites

1 hour ago, comment said:

Since a portal row will only display a single related record, you must use three side-by-side portals for this. And - assuming the number of related  records is reasonable - you can use portal filtering to make each column display only records whose position in the related set modulo 3 corresponds to the column number.

The filtering expression is a bit complicated, since there is no function that would return the position of a record in the related set directly, so try =

```Let ( [
indexValues = List ( Child::ChildID ) ;
index = ValueCount ( Left ( indexValues ; Position ( ¶ & indexValues & ¶ ; ¶ & Child::ChildID & ¶ ; 1 ; 1 ) ) )
] ;
Mod ( index - 1 ; 3 ) + 1 = 2
)```

This is for column #2 out of 3.

Thank you. I will give this a try. I wonder if it is possible to create a table that is constructed, virtually, of other records. The outcome of the division would be that the table would create record 1 out of 1-3 from the source table, record 2 from 4-6, and so on. If I then displayed those records, with the fields corresponding to the data in the other table, might this prevent the need for multiple portals side by side?

And the number of records I am looking at would never exceed 100 (practically speaking, never 99, actually), generally hovering around 18 to 24.

##### Share on other sites

11 minutes ago, AndrewPurvis said:

I wonder if it is possible to create a table that is constructed, virtually, of other records. The outcome of the division would be that the table would create record 1 out of 1-3 from the source table, record 2 from 4-6, and so on.

I am sure it's possible - but I suspect it would be about 10 times more complicated than filtered side-by-side portals, and with no advantage whatsoever. This is a purely display issue and it would be best to solve it without adding to the schema. With less than 100 records I wouldn't look any further.

• 1
##### Share on other sites

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