Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Portal table with multiple rows/columns

Featured Replies

How would one make a table using portal records that has 3 columns and multiple rows as needed? I've only succeeded in making a table 1 column and multiple rows OR multiple columns and 1 row.

Do you wish to use three different fields; one in each column? Or, are you using one field which is displayed three across, then row-by-row?

A couple of threads exist on this subject. One thread talks about using calculated fields and cdml to determine the change of row. The other thread talks about using Javascript to format the columns and rows.

All the best.

Garry

  • Author

I wanted one related record (multiple fields) per cell three across, then row-by row. I did look at both of those threads, but if cdml can't do it "out-of-the-box" ...

I recommend using Javascript.

Garry

Try something like this:

<table>

<tr>

[FMP-Portal:Relationship]

<td>

[FMP-Field:Relationship::FieldName]

</td>

<script>

if (([FMP-CurrentPortalRowNumber] % 3) == 0)

{ document.write("</tr><tr>") ; };

</script>

[/FMP-Portal]

</tr>

</table>

Not exactly "out of the box", but it will format related records 3 across before starting a new row.

  • Author

I tried that, and it didn't work (one big line again)... can I put [FMP-CurrentPortalRow] in the format file to see what portal row the record is? (...because I did, and it just displayed [FMP-CurrentPortalRow] and no number...) Is there something that needs to be in the layout with the portal?

Can you post your code here, so we can have a look!

All the best.

Garry

  • Author

I'll have to resurrect it... anything I tried this morning is in the vertical file.

Use [FMP-CurrentPortalRowNumber], not [FMP-CurrentPortalRow], which would explain why no number was generated.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.