Forum Discussion
QuickBaseCoachD
11 years agoQrew Captain
Make a summary field of the maximum of the Record ID# of the child status table records called [Maximum Record ID# of status records]
Make a new relationship where 1 Status is related to Many parents - ie a reverse relationship and the reference field at the right side will be that field [Maximum Record ID# of status records]
Then just do a lookup of the Status from the Child to the Parent. but QuickBase will see it as a lookup from a parent to a child.
Make a new relationship where 1 Status is related to Many parents - ie a reverse relationship and the reference field at the right side will be that field [Maximum Record ID# of status records]
Then just do a lookup of the Status from the Child to the Parent. but QuickBase will see it as a lookup from a parent to a child.
- MarleneMarlene9 years agoQrew TraineeHi!
My apologies for the very naive question but how/what is the syntax to get the maximum record ID#?
I created a field and typed ' Max([CI-PN ID#]) ' under the formula field but the syntax seems to be incorrect.
How do I get a max of a record?
And more generally how can I get the max of a table or a column of a table?
Thanks for your help - QuickBaseCoachD9 years agoQrew Captain:)
You need to have a relationship first. If you need to have the Maximum of a whole table just to get it for some reason,, the you will need ot set up sort of a dummy table and enter one record into it. It will be [Record ID#] of 1.
Then on the details table where you want to know the Max, you will make a formula field called perhaps [Link to max record table (=1)] and make it a formula numeric field with a formula of 1.
Then make a relationship where that 1 Max record table has many (in fact all) details records based on that link field used on the right hand side of the relationship.
Then make a summary field on that relationship for the max record ID. There is a button to make a summary field on the left side of the relationship.
Then do a lookup of that max field down to the child table and every child will know what the max record ID# is. - MarleneMarlene9 years agoQrew TraineeThanks!
I realize it is much different from what I would have done on excel/matlab..A whole new philosophy to embrace ;-)
I have done my homework and managed to retrieve the latest status which was my initial intend. Thanks a lot for the explanation! - QuickBaseCoachD9 years agoQrew CaptainYes, I know that it seems strange to have to build a whole table, but that is what we do.
- _anomDiebolt_9 years agoQrew EliteDon't despair Marlene I am a long time Matlab user and we are going to bring more functional paradigms to QuickBase and use JavaScript for everything starting with replacing the formula language with script.
- MarleneMarlene9 years agoQrew TraineeHi Danimal! I am actually going right now through your pasties #314 (which brings a functionnality that I expected to be built-in but is apparently not). I may have to come back to you about that too.
Anyway thanks to both of you for sharing your expertise. On-line support told me for both questions that is was just impossible to do in quickbase. I am glad to see that there are ways around.. - _anomDiebolt_9 years agoQrew EliteOnline support uses some coded language. When they say something is "impossible" they mean that you should use script.
- AnthonyGuillen18 years agoQrew CadetIs there any way to pull the most recent child record using maximum date instead of maximum record ID#? In my application, some child records were created out of sequence with more recently created entries having older dates. I imagine that using Maximum Record ID# works because then it ties to the record number on the reverse lookup. I can't figure out how to make it work with date.. any thoughts?
- QuickBaseCoachD8 years agoQrew CaptainNo problem
Summarize max date.
Lookup to child
Summarize max record ID subject to the filter that date = max date. - FrancescoGallar3 years agoQrew MemberHate to bring back an old thread but the approach described works only with record IDs or can it be done with other fields as well?
For example if I want the most recent item from the child table based on a date field is there a way to do so?
------------------------------
Francesco Gallarotti
------------------------------