Forum Discussion
Hi Mike
That'd be great. But there is no limit on entries per customer and they often exceed 5. Essentially, anything other than the most recent 2 entries are "legacy fields" for reference only. That is, every time a new entry is added the oldest of the most recent can drop off as far as the calculation or summary fields are concerned. Is there a way to restrict these summary fields' frame of reference just by setting the Read Date sort to "Group latest to earliest" and then restricting the summary to only look at those first two entries? I am new to QB so I am not sure of all its functionality/limitations, but yes-I would appreciate your help setting this up to see how it works within our app.
------------------------------
Jill Jackson
------------------------------
Chayce,
So with the looping relationship, the only time it could fail is if you added a record in, but with a prior date. Suddenly the related field would be incorrect. I suppose that should be rare or not even happen, but maybe a formula query as the related field would work well....though I do hate relying on queries as they are memory hogs. But I really like that looping relationship idea.
------------------------------
Mike Tamoush
------------------------------
- ChayceDuncan2 years agoQrew Captain
In theory yes - with the looping relationship the assumption is that the children are all being added in order and the most recent record is always going to be the one you want associated. That doesn't factor in other filters like saying that an entry may have been canceled so you would want to omit those from being considered in your summary field as a side thought.
If the children are added out of sequence or in a way that you can't relate them this way - then you could explore a formula query that tries to find your most recent record on the fly and create your looped relationship that way. Formula queries can't be sorted but you can kind of hack them by creating a string that represents a number and create a fake sort where the most recent date appears first in the query result and just split the first entry as your related record.
------------------------------
Chayce Duncan
------------------------------