Using associated table values in current record


I have a table called Routings_Master with a Related table Dresser_Details_Master through [Record ID]. Both tables have [Colour Code] & [Location] columns. What I want to achieve is if there is a Dresser record completed as part of the Routings record, I want the values from [Colour Code] & [Location] in Dresser_Detail_Master to be passed back into the corresponding fields on the Routings_Master record. From what I can understand though the function I am using for initial value (i.e. SELECT()) in [Colour Code] & [Location] in Routings_Master presumes the record exists already in the Dresser_Detail_Master table. Is it possible to pull values into a table from an associated table before all the records are saved?

Many thanks.

Is it possible to have multiple Dresser_Details_Master records for each Routings_Master row? In other words, is the relationship between these two tables a Parent/Child relationship where there can be many children?

If there are multiple Dresser rows for each Routings record, can they have different [Colour Code] and [Location] values?

1 Like

Thank you @WillowMobileSystems

Operationally there would only be one Child record.

1 Like

Ok. I’m not clear on your table relationship. Assuming it is a physical Parent/Child setup, “Is part of” turned on in the parent id column of the Dresser table then…

I believe the answer to your question is YES. When you enter a new row in the Dresser (child) table and click save it should be available in the table on the device so that when the app brings you back to the Routings (parent) table, the SELECT() will pick up the new row so you can migrate the desired values.

Once you click Save on the parent record, then all updates are pushed to the server.

FYI, if you use the expression in Initial value, it will only update on new records. If you later modify the Dresser record, the values on the Routings record will not re-update. This can be corrected by moving the expression to the App formula property of the columns.


Thanks again @WillowMobileSystems for clarifying. I will continue to test my expressions.