AnsweredAssumed Answered

Multiple portals to make a grid - but how to sort within?

Question asked by SlaterKing on Jan 10, 2019
Latest reply on Jan 10, 2019 by SlaterKing

Hi All,

 

I've detailed in another post a way to make a grid using a custom function based on the Extend function. It's kinda cool, but it won't work (as far as I know) when you want to show multiple related records (Person has a 1 to many relationship with Photos, and you want to see a grid of their photos, whilst being on their page).

 

Just to set out how I'll be talking about things:

Table 1: People

Table 2: Photos

There's a 1 to many relationship, based on Photo_ID which is a number.

 

Innitially, I had success with multiple portals, side by side. Say the first portal on the left has 3 images in it, then the portal on the right starts at # 4 image and so on ... you get the grid. If you want to see the next page of images, you use List to find out what the ID of the first image on the next page would be (you know this because you know how many images are on the page). Let's say that the next page starts with Photo_ID 34 then you have the relationship between the two Tables as Photo_ID => 34

 

 

But what I want to do is be able to order those images. The problem with that is that if they're ordered, then perhaps Photo_ID 25 comes after Photo_ID 34 because of the sort, but it won't show up in the portal because you're sorting with  Photo_ID => 34. It doesn't make it through the portal because it's ID is less than 34.

 

I've tried to make a combined key, ie

Combined_Key = Sort_Order & "_" & Photo_ID

but I haven't been able to get that to work, but I'm assuming the answer is along this route?

 

Is there any possible solution that you could bump me towards a solution, so that I can keep my grid from the portals, but have them sorted within that?!

 

Many thanks,

Outcomes