Update a Parent Record while also Updating Child Records in Knack
- Dave Parrish
- 13 hours ago
- 3 min read
Hey folks, Dave Parrish here with another Knack tip — and today I want to dive into a real-world scenario I’m actively working on: how to keep parent and child records in sync, especially when you're dealing with updates that should cascade.
Let’s get into it.
The Parent-Child Setup: Expense Reports and Line Items
In most apps I build, there's some kind of parent-child relationship — like an invoice with line items, or a purchase order with products. In this particular case, I’m building an Expense Report module for a client.
Their employees travel often and previously submitted spreadsheets and receipts. Now, we’re moving everything into Knack to streamline the process. Each Expense Report is the parent, and it contains multiple Expense Line Items as child records.
Sounds simple enough, right?
The Problem: Mismatched Payees
Here’s the tricky part. Each Expense Report has a payee, and that information often needs to be reflected in the child records too. Sometimes, that’s just a connected field pulled from the parent. Easy.
But in this use case, the payee needs to be a native field in the child records. Why? Because downstream processes rely on that value — it ties into budgets, grants, fiscal years, and other critical tracking mechanisms.
So, what happens if someone updates the payee in the parent record? Without a rule in place, the child records don’t update automatically. Now you’ve got a data integrity nightmare — the parent says one thing, and the children say something else. Not good.
The Fix: Using Record Rules to Update Connected Records
Let me show you how I fix this using Knack’s Record Rules feature.
When you go into the edit form for the parent (in this case, the Expense Report), you can create a rule that updates connected child records. Here's what I do:
Go to the form’s Record Rules section.
Add a new rule: Update Connected Records.
Set it to update each Expense Line Item (child record).
Tell it to set the payee field in the child record to match the one in the parent.
It’s simple, but powerful.
See It in Action
Here's what that looks like in real time:
I go to an existing Expense Report.
I edit the payee — let’s say the user originally chose the wrong one.
I submit the change.
Boom — all the connected line items now reflect the new payee automatically.
That’s how you avoid data mismatches and ensure everything stays aligned. Especially when you're dealing with complex systems that involve multiple connections and financial rules — you want to keep things tight.
Pro Tip: Controlling Edits on Child Records
Sometimes, the user wants to edit individual line items. That’s fine — if they know what they’re doing.
But often, it’s just too much. In those cases, I lock down those child records. I tell users: if you need to change it, just delete and re-add the line item. That way, I maintain control and avoid bad data.
Bonus: It Works in Both Directions
What I’ve shown here is updating child records when the parent changes — but you can do the reverse too. If something changes in a child record and needs to affect the parent, Knack can handle that as well using the same update connected record rules.
Final Thoughts
This kind of setup really comes into play when you're working on more advanced Knack builds — the ones with layered data structures and lots of interdependencies. Getting your update logic right ensures smooth workflows and clean, reliable data.
That’s it for today. Hope it helps, and I’ll see you in the next one!
— Dave Parrish
Interested in my Knack database services? ... Book a call with me here: https://calendly.com/daveparrish/callwithdaveÂ