Jump to content
Server Maintenance This Week. ×

End of Nth record at 250?


FMPing

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

Recommended Posts

Anyone can explain why Nth record stop calculate an unstore field with the following:

Case(Get ( RecordNumber )=1;GetNthRecord ( num; Get ( RecordNumber ));num+ GetNthRecord ( SumStore; Get ( RecordNumber ) - 1)

)

Thank

Nthrec.jpg

Link to comment
Share on other sites

I havn't tested if I reach same number, but it's not the easiest task you throw at the calc'engine here, fields depending on the result of another unstored calc. This is I take it - similar to recursive definitions have an upper limit for recursions, simply to prevent you from pulling the entire system down when making a foolish definition.

Perhaps you instead of having all these calcfield relying on each other, should use GetNth in a recursive CF to gather the ID's of the records in the found set, and then make it multilinekey for a selfjoin relation, over which you make a Sum( such a CF can gather approximately 10000 records. This won't give you the figures at each stage as you example shows.

Another idea is to utilize such a ID gathering CF to produce a list of ID's for the found set...

In each line could your field SumStore be defined as this unstored calc'field:

Let(theList=GetValueSet ( RecordID ; 1 );

Evaluate ( Substitute ( Left ( theList; Position ( "¶" & theList & "¶" ; "¶" & RecordID & "¶"; 1 ; 1 ) ) ; "¶" ; " + " )))

Utilizing this CF def. http://www.fmforums.com/forum/showpost.php?post/202738/

--sd

Link to comment
Share on other sites

Just testing. I got a file that have 500,000 records quite a few of summary fields and the time bar on the window when the field is doing the summarizing is pretty long. Recursion only limit to 10,000. Script doesn't apply in this case. Just thinking out of the box with the FMP new functions.

Link to comment
Share on other sites

And this is better than a summary field, because...?

Better or better... If you should wish local values in each record of a found set based on the previous records sum. It wasn't as clear a task for me as it were for you!

I just thought of a way to move the circular reference issue elsewhere ...if it's faster or slower??

--sd

Link to comment
Share on other sites

This topic is 6575 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.