Jump to content

Multiple Records in Portal Row


PacificStar
 Share

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

Recommended Posts

I'm using a portal to show images and prices of items that appear on a web page. Currently, one row per record, that scrolls endlessly.

1

2

3...

I would like to show 4 items on each portal row, to approximate the layout on the web page, and be able to edit specific fields from the record being shown.

1 2 3 4

5 6 7 8

9 10 11 12...

How can I set the portal to show an item + the next three items, and then skip to the 5th record for the next row?

Even if a specific solution doesn't exist, I would like to just know the terminology I should be searching. So far nothing I've searched that I thought would be the correct term has turned up anything helpful.

Thank you for any advice, pointers, or information you can provide.

Link to comment
Share on other sites

A portal row = one record in the related table. The only way to accomplish what you describe would be to use another table where each record is a "parent" for exactly 4 items in the Items table - but you won't be able to edit the items directly in the portal.

Another options is to use 4 portals side-by-side, but then you can only "scroll" by scripted buttons - see something similar here:

http://fmforums.com/forum/showpost.php?post/201804/

Link to comment
Share on other sites

I've made a little progress. I've been able to get the following format:

Row One 1 2 3 4

Row Two 2 3 4 5

Row Three 3 4 5 6

Row Four 4 5 6 7

Row Five 5 6 7 8...

I set up a field with a position for each item numbered 1 through X, and a calculated value for the position + 1.

The portal shows items from table Cat1, which is related to itself as Cat2, which is related to Cat3, which is related to Cat4. The relation in each case is between Position + 1 to Position.

I'm able to edit related fields for all four items showing in each row of the table.

Now I need to exclude rows 2 through 4, which should give me the result I was looking for.

Is there an easy way to do that, or should I set up a calculation to indicate a which items should start a row and then restrict the portal through another relationship?

Any hints are appreciated. Thank you.

Link to comment
Share on other sites

Two main tables. Web Page and Catalog

Web page has a field for Category, as does Catalog. The relationship is Category = Category.

I created a new field called Column in the Web Page table, set to value =1 and calculated the Column in the Catalog table with a formula that gives me a result of 1 2 3 or 4. Value 1 should be only the ones I want to appear in the first column.

I updated the relationship to include Column = Column, after which all the portal records dropped out. I assumed that if 1 = 1, it should show me every fourth record.

I'm obviously missing something.

Link to comment
Share on other sites

Make the Column field in the Web Page table a calculation field = 1 (this can be unstored).

The relationship should be:

Web Page::Category = Catalog::Category

AND

Web Page::Column = Catalog::Column

---

This is assuming, of course, that records are numbered sequentially within their category.

Edited by comment
Link to comment
Share on other sites

Storage was the issue!

I had the calculation on Catalog::Column unstored. As soon as I let it store, everything popped in to place.

I now have a portal with the format:

1 2 3 4

5 6 7 8

9 10 11 12...

THANKS!

I've been learning as I go along, and it looks like I need to go back and learn of the basics that I missed.

Thank you very much for pointing me in the right direction. I've been working on this on and off for months, and finally got frustrated and thought I'd see if anyone here could help.

Much appreciated.

Link to comment
Share on other sites

This topic is 4397 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.