Update a value in secondary table which then automatically updates in primary table

Hello! New Glide user here.

I’m built a small food diary app. It has a main table (Entries).

When adding a new entry, I can select the “meal type” (e.g. “Breakfast”, “Lunch”, …) and a “feeling” (e.g. “Good, no negative effects”, “Bloated”, etc).
The meal types and feelings each have their own table.



Everything is working correctly, but the other day I decided I wanted to change the “feelings” labels to have different emojis so they’re more visually distinct (e.g. change “:slightly_smiling_face: Good, no negative effects” to “:green_circle: Good, no negative effects”).

I thought that, since the “feeling” column in my “Entries” table was getting the selected value from the “Feelings” table, when I updated the “Feelings” table value it would automatically update all the relevant entries already in the “Entries” table. But instead, it only applies the change to newly added entries.


How do I make it so that, when I update a value in the “Feelings” table, that value is updated in all existing entries in the “Feeling” column (in the “Entries” table)? And same question for the meal types.

A couple of screenshots of how this looks in the app:


Any help is appreciated, thank you!

1 Like

Instead of copying the “Name” text from the Feelings table (which it looks like you do) into Entries you could add a rowID to the Feeling table and write the rowID for the matching ‘FEELING’ into the Feelings column (rather than the text from the Name column) in Entries.

Then create a Relation (such as rel->Feelings) from Entries/Feeling to Feelings/rowID (Entries.Feeling = Feelings.rowID) in the Entries table. You use Glide’s Lookup column type to return the rel->Feelings.Name. Now whenever the Feelings table is updated the corresponding data in Entries will reflect the change.

3 Likes

Thank you Matt for the quick reply, this worked perfectly! :raising_hands:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.