Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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)

 

 

Posted

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?

Posted

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.

This topic is 4190 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
×
×
  • Create New...

Important Information

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