Jump to content
Salesforce and other SMB Solutions are coming soon. ×

GetNthRecord and repeating fields


Recommended Posts

hi everyone


i'm sure this has been asked before, but i was wondering if there is a way to set the repetition values of a repeating field to be some function of GetNthRecord...?


for example, i am attempting to build a quick thumbnail browser. my thinking was i could use a large repeating field that is some calculation based on GetNthRecord... where repetition 1 is record 1, repetition 2 is record 2, and so on...


ideally i would like some function along the lines of *Set*Repetition... you know...


SetRepetition(repeating field; repetition number; GetNthRecord(record; running count of records + some possible offset so i can page through hundreds of records)) or something like that, but i am at a loss as to how to achieve this with the functions available in FM...


has anyone attempting anything similar in the past and had success? i would welcome your suggestions if you have!



Link to comment
Share on other sites

I suppose you could do this like so:


GetNthRecord ( Extend ( field ) ; Get ( CalculationRepetitionNumber ) )


But I think it would be better to just use portal based on a self-join relationship to show desired records. The main difference being that the getNthRecord() calc pulls records from the current found set, where a relationship shows the related records, whether they're in the found set or not.

Link to comment
Share on other sites

It can be done but why not use a portal?


well OK, this has two unstored calculations in it... use it at your own peril ;)


1. relate the viewer table to the data table through an X join.

2. define

gNumbers=global, number, say ten repetitions, fill them out with 0-9

gOffset=global, number

gView=global, calc=gNumbers+Extend(gOffset)

data=calc, repeating [10], GetNthRecord(Extend(DataTable::data);gView)



Link to comment
Share on other sites


  • Create New...

Important Information

Terms of Use