I am new to Glide. I am wondering how to update Master table when detail is updated. For example, i have a status column with starting value as “New”. I want to update that column to “Open” when a record added in Detail table or “Completed” when a detail record is updated.
I see a solution like having single value but not sure how to do that or if you have a better approach, kindly help me.
You’ll need a MasterID column in your Detail table. You can use that to create a relation between your Master table and your Detail table. If that relation is not empty, then you have a related Detail record. If you need to check the values of specific columns in your Details table, then you can use lookups through that relation. To return a different Status value based on conditions, you can use an if-then-else column.
Yes Darren, like what you said i have in my app. I am able to save records on both master and detail. Also I can use if-then-else to display different status on the screen. But my question is, how i will update master table physically with a new status code when something changed in detail?
So you want to save the status in a non-computed column in your Master table?
Okay, so you just need to create a Single Relation from the Detail table to the Master table.
Then when something changes in the Detail table, you can do a Set Column values through that relation to update the status in the related Master record.
Excellent. Good to learn that. Thank You Darren, have a great week.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.