4 Replies Latest reply on Feb 25, 2012 12:44 PM by ArthurJoyce

# Use of record field not in found group for a calculation

### Title

Use of record field not in found group for a calculation

### Post

I have a calculation field where I'm trying to get a date field from the last record of the total database and then using that field date in a found group of records. My present line of the calculation is:

end = GetNthRecord ( mydatefield ;  Get (TotalRecordCount) ) ;

I found that the calculation works great as long as all the records are being displayed. There are 1700 records in the database. However, as soon as I find a group of 400 records, the calculation field doesn't show anything at all.

The database changes weekly and I need a specific date from the last record created in order to do what I want to do when I find a subset of the database.

Any help is greatly appreciated.

Arthur Joyce

• ###### 1. Re: Use of record field not in found group for a calculation

Hi

being the date a number, a summary field ( result date ) : Max ( cartesianSelfJoin::yourDateField )
could do the job.

• ###### 2. Re: Use of record field not in found group for a calculation

Sorry, raybaudi, but I do not understand your answer at all. The date field is not a summary field nor a number field. And, I don't understand the cartesianselfjoin statement. In short, I'm thoroughly lost on your answer. But I do appreciate your taking the time to give it to me.

Art

• ###### 3. Re: Use of record field not in found group for a calculation

1) Duplicate your current table into the relationship graph
2) If the name of your table is ABC, you'll see a new one, named ABC 2
3) Connect two fields ( certainly not empty ) of both tables ( Normally it is used the ID field )
4) Doble click the = symbol between the two TO ( Table Occurencies ) and change it to "x"

You have just created a cartesian self join

Now, in the original table, create a new SUMMARY field ( result date ):

Max ( ABC 2::yourDateField )

That is all.

• ###### 4. Re: Use of record field not in found group for a calculation

OK. I think I've gotten a little more understanding. And . . . it's actually doing what needs to be done. Now, the question is, will I remember what and why I did what I did the next time I do something to change the structure of my database? Time will tell.

Thank  you for your patience and help. It's appreciated a lot!

Art