I have a client table that is linked to a number of other tables that contain survey instruments. On the client record form, I have buttons that connects to each survey and create a new record. When the survey record is created, I would like the client_id field to be populated by same id from the client table record where the button was clicked. I thought that the best way to handle it was to create a temporary variable and set it equal to the id in the client table, then create the new record in the survey table, and set the client_id field to the temporary variable.
How do you set the client_id to the temporary variable? Or is there another way to set the client_id field to the right id?