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 6217 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

Is is possible to populate a repeating calculation field with either the List function or getNthrecord function?

Posted

How populate, aren't this a bit vague to say the least? I'm afraid you must humble yourself with an explanation of context and purpose.

In my confusedness, did I for a short while, wonder if it this way around you mean:

http://fmcollective.com/2007/08/29/pseudoportals-with-alternating-fill/

...or the opposite?

You might get some inspiration to both way by this:

http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000686

...but I see you have been registered member of this forum for nearly 3 years, not that many posts though ... but by that, ought you now have realized, that this form for tutorials or help falls apart, when there's too little to go on. The answers you are likely to receive would merely be stabs in the dark, than anything particular useful!

--sd

Posted

I have re-read my question and it seems precise and concise to me but if verbosity suits you I will enlarge.

A repeating field has a number of values.

The List function can return a number of values.

The GetNthRecord function can return a number of values.

So, is it possible by means of a calculation using either of those functions to fill in, populate, give data values to, to set the repetition values?

I thought I had read somewhere that it was possible to treat repetition values as an array something like:

Let([

Rep[1] = GetNthRecord(Contacts::First Name;1);

Rep[2] = GetNthRecord(Contacts::First Name;2)

]

But I suspect that array elements could not be used as left values. If it can be done I suspect it would use the tail recursion trick. Another thing I am not sure of is whether Filemaker puts the ASCII 29 character in the repetition field or if one creates a string with ASCII 29 separated values it becomes a repetition. I strongly suspect not.

I really don't think that I have added anything that would help a person who knew how to do this understand what I am asking,

Norman

Posted

I really don't think that I have added anything that would help a person who knew how to do this understand what I am asking,

I'm afraid I have to agree. It would help considerably if you explained what you have, and what you want to have. Abstract discussion of techniques rarely lead to anything.

Posted

A repeating calculation of:

  GetNthRecord ( Extend(X) ; Get ( CalculationRepetitionNumber ) )

can fill in repetitions with values of X from the 1, 2, 3, etc record. Note that extend is needed just to convince the calculation engine that there is need to compute all repetitions, since the field X is not a repeater in my example.

Posted

That worked a treat. Tell me, did you work out how to do this from the Filemaker documentation?

This is why I wanted to do this:

1. Most charting examples use fields in the same record. I wanted to chart values from the 12 records in a year.

2. Again, most charting examples need to find the maximum value of those to be displayed so scaling can be done.

Using a calculated repeating field makes this all more concise as now I have:

MonthsToShow containing my 12 values:

GetNthRecord ( Extend(Analysis::Hire Month Total) ; Get ( CalculationRepetitionNumber ) )

and MaxMonth:

Max ( MonthsToShow )

-----------------

Is it possible to use the same technique to set an array of calculation variables?

Thanks once again,

Norman

Posted (edited)

I gave almost the same answer in my post:

[

f =  Extend ( PO_LineItems::Item );

g = GetNthRecord ( f ; Get (CalculationRepetitionNumber ))

];

If (g<>”?” ; g; “”))




...in my first reply - compared with what Shawn provided you with, looking like this:




 GetNthRecord ( Extend(X) ; Get ( CalculationRepetitionNumb er ) )

However do I with the additional info you later gave, think you're barking up the wrong tree here, why is sub summary reports ignored here?

--sd

Edited by Guest
Did not intend to insult Norman, the post was reported - hence the change!
Posted

Tell me, did you work out how to do this from the Filemaker documentation?

Well, I don't know where I learned that anymore, but the Extend() function is documented, and its proper usage is common knowledge among those using repeating fields.

I don't see any harm into using repeating fields for the case described.

Posted

Thanks again for the help. I think I ended up with a pretty neat charting solution which is attached.

The 'ScalingFactor' variable in the field 'MonthsScaled' looks a bit odd. This is because I started off scaling the chart to the set of results. This made comparing years not work so I just made a y-axis of 500k that suited my data.

I chose the Webdings font as it looked OK and worked on both Windows and OS X.

This chart is pretty simple to implement, is FM based, is dynamic and updates quickly.

RepChart.zip

Posted

Your file is unusable. It refers to another file, Analysis, which you do not provide.

Posted

Whoops! Sorry. Here is a new version. I hope I have done better. I was trying to produce a free standing file from the one linked with real data and did not succeed.

RepChart.zip

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