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.

Featured Replies

Is there a way to loop through the records in a portal,

something similar to getting the next record in found set?

 

GetNthRecord(field:Get(RecordNumber)+1)

 

 

  • Author

Maybe I figured it out, tell me if this sounds right.

 

I can use GetNthRecord(field:Get(RecordNumber)) , it's that I have to evaluate the calculation in the context of the records that appear in the portal and not the records that are in the layout's table.

 

That seems to work,

Is that it?

Maybe I figured it out, tell me if this sounds right.

 

I can use GetNthRecord(field:Get(RecordNumber)) , it's that I have to evaluate the calculation in the context of the records that appear in the portal and not the records that are in the layout's table.

 

That seems to work,

Is that it?

 

Not sure what calculation you're talking about. GetNthRecord works via the related set and the sort order of a relationship, not any portal (actually, you don't need a portal): simply use a related field, and in a loop, make sure that your loop terminates, i.e. count the number of related records and use that value as exit condition. Actually, before the introduction of List() in 8.5 (or thereabouts), GetNthRecord was used for that purpose.

 

So starting from the current context, GetNthRecord ( my´RelatedTable::myField ; n ) will give you the contents of the field myField in the nth record of the related TO, as defined by the sort order for the relationship with myRelatedTable.

 

All of which (and more) you can read in the Help System, btw.

 

If you need to loop through just the records that appear in a filtered portal and/or rely on the portal's sort order, than AFAICT you need to loop via Go to Portal Row.

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.