Skip 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.

All portal values in one field

Featured Replies

Hi

I need a little more help and hope someone have an idea.

I would like to send all information from a layout in a mail. However the layout include a portal and I can only get the first line added to the mail.

This option could be a calculation made in the Send Mail or Send Event option but I was thinking that maybe the best way is to make a script that show the information in a Global field that I then can add to the mail body.

My problem is getting all the lines (5 fields and unknown number of lines) in the portal in the global field.

Do anyone have an idea for me to try?

Thanks for any help on this.

Cheers

Jens Peter

I would write a script that either loops through each portal row, setting the global field to the contents of each portal row before going to the next portal row, or that uses the new GetNthRecord function to essentially do the same thing without requiring you to loop through each portal row which requires that the portal be readily available.

I would have a subscript go to the related records in the portal and step through them, appending the data from each child record to the global field.

I posted this as the above response was being posted, and ended up second.

But I agree with the get nth record approach. That's a good way to go.

Edited by Guest

  • Author

Hi Lwlgeorge and Ross

Sounds like the GetNthRecord could be nice to use but my problem is to get it to work.

Even the loop thing I am not so sure about.

I have an ID that links to the data in the portal.

How would I get the script to loop or use the GetNthRecord correctly.

I have tried a number of codes but all I get is the first record in the portal.

Any help is much appreciated.

/Jens Peter

Something like this should work:

Set Variable[$count_PortalRecords; Value: Count(Related::ID)]

Set Variable[$counter; Value: 1]

Loop

Set Field[global_Field; global_Field & GetNthRecord(Related::Field1; $counter)]

Set Variable[$counter; Value: $counter + 1]

Exit Loop If[$counter > $count_PortalRecords]

End Loop

  • Author

Hi Lwlgeorge

Thank you so much.

I have made the script and it now add all the records in the portal by the first field.

Except it start the line with a ?

For the other 4 fieds I have then added also but for each line I add there are also added one extra ? at the start of the global field.

I have added the extra fields the Set Field (global_field: global_field & GetNthRecord ( Related::field1;$counter) & " " & GetNthRecord ( Related::field2;$counter) and so on...

Why are there added these ??

This is great - except for the start ? it work as a dream. Thank you.

/ Jens Peter

  • Author

Hi Lwlgeorge

Sorry for this - my mistake.

In the second Set Variable I forgot to add the Value: 1

When added - no ?

Thank you again.

Jens Peter

Your welcome Jens. Glad I could help. Also, glad you figured out the "?" problem.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.