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.

How to extract info from portal rows

Featured Replies

Hi,

I have a table called Books and a table called Publication.

On a layout based on Books, I have a portal based on boo_PUB_BooksId (Books::Id = boo_PUB_BooksId), where one or two publication dates are selected.

In a card window based on Books, I have a portal based on boo_BOOKS::Editor (Books::g_SelectedEditor = boo_BOOKS::Editor) that displays the nos and the titles of books from selected editors. That works fine. Except I want to add the publication date or dates in that portal. But I can’t manage to extract the dates from boo_PUB_BooksId (the portal on the Books layout). Could someone help me achieve that.

I’d like the dates to be displayed as follows:

If single date: 25 October 2023

If two dates: 25 October 2023 and 30 October 2023

Right now, the card window is displayed by means of a script and a global field that is populated from a value list.

Thanks for your help.

Edited by The Learner

You want to add the publication dates to the editor’s portal or show the dates above the portal? Is the publication date related at all to the editor?

if you want to show the dates, either show both portals in the card or add a calc (several ways) that displays a list of publication dates above the editors portal. 

  • Author

Thank you for your response.

The publication dates are already displayed in the portal to the publication table on the main layout. l want these dates to also be displayed in the editor's portal in the card window. I don't want the publication dates above the portal, simply in each row of the portal, beside the book no and the book title.

 

I am afraid your question is still not quite clear.

Assuming that one book can have many publications and that each publication has a single publication date, you can use a calculation field defined in the Books table as (result is Text) =

Substitute ( List ( Publications::PublicationDate ) ; ¶ ; ", " )

to display all related publications' dates as a comma separated list, with the dates formatted in your file's stored date format. 

If you want to format the dates in a custom format and/or use the word "and" instead of the last comma, then more work will be required.

 

  • Author

Thanks very much. Your calculation does what I want except for the comma instead of the and. But I'll live with it.

  • Author

Issue resolved. Thank you.

That’s exactly what I suggested (“add a calc (several ways)” and you said it’s not what you needed. You want the dates in the editor’s portal. That made me question your data model. 

Just a small point of clarification:

Your title says "extract info from portal rows". That's not what my suggestion does. A portal is a layout object. My calculation works at the data level. It does not rely on a portal and will work regardless of whether there is one on the current layout or not.

OTOH, if you do have a portal, and the portal is filtered, the suggested calculation will ignore the filtering and you will see a discrepancy between the portal and the calculated result.

 

  • Author
4 hours ago, The Learner said:

l want these dates to also be displayed in the editor's portal in the card window

Well, I'm sorry if there was some misunderstanding. But above is what I said in my second post.

Yes, exactly. Comment provided a way to show a list of dates. They are not in the editor’s portal, are they?

  • 2 months later...
On 11/26/2023 at 9:04 PM, comment said:

OTOH, if you do have a portal, and the portal is filtered, the suggested calculation will ignore the filtering and you will see a discrepancy between the portal and the calculated result.

But instead of the calculated list, you could use the summary List Of living on the child side of the relation, and showing the summary field via yet another one line portal where the applied filtering is the exact same - the substitutions of the pilcrows is then made by massaging with

GetLayoutObjectAttribute ( objectName ; attributeName {; repetitionNumber ; portalRowNumber} )

....after having named the field shown in the new portal as object. Resizing this extra portal to 1 pix times 1 pix might be in order, and stowing it away in a corner seems obvious!

 

--sd

3 hours ago, Søren Dyhr said:

Resizing this extra portal to 1 pix times 1 pix might be in order, and stowing it away in a corner seems obvious!

That's not necessary. You could simply put the portal on the margin of the layout, outside of any layout part.

However, all this added complexity is not required here, since the original portal is not filtered.

 

6 hours ago, comment said:

However, all this added complexity is not required here, since the original portal is not filtered.

Agreed....

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.