Forum Discussion
Hi Mark,
I'm sure you've thought of this and discounted for some reason...
If I was doing this I would:
1) Use Count Summary fields to determine the number of dates which need to be deleted, and pass this back to the child via a lookup.
I assume the max possible is 80-60=20?
2) Use Max Summary fields (you'd need 20 of these to cover the max you'd ever need to delete) to identify the child record IDs with the highest dates excluding your blackout dates with each summary excluding the value of the preceding one.
3) Pass these IDs back down to the child records in 20 separate lookups.
4) Create a formula checkbox field called something like 'Record to be deleted?' to identify where the record ID of that specific child equals any of the up to 20 record IDs you've pulled from the parent via the lookup and identified as needing to be deleted. You'd use the value from Step 1) in your formula, to determine how many of the 20 fields to check.
5) Use a timed automation (or pipeline) to delete any child records with that flag checked.
I've done something similar to this (without step 5) where I needed to identify the latest 9 'active' records (with no limit on the potential total number of child records) in a child table, allowing for uses to re-order and manually exclude / re-include records, and it works fine.
In fact I'm pretty sure it was one of your posts, Mark, that inspired this approach!
Lol.
Hope you can get your head around this now, and that for a change I can actually help you with something!
David
------------------------------
dmlaycock2000 dmlaycock2000
------------------------------
- MarkShnier__You5 years ago
Qrew Legend
OK, interesting. I only thought to count forward and was thinking it would be crazy to do 80 summary fields. but I can count backwards, In fact I could do say the 10 highest dates and have a button to delete up to say 10 "extras" at time extra in one click. Or maybe a Pipeline.
Thx, I have an approach now.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------