September 30, 201015 yr I have two related tables, one to many. NAMES, made up of: name home_address nameID PLACES, made up of: Place nameID The layout shows one Name and through a portal shows many Places. How do I write a button script that adds a new record in PLACES and then inserts names:home_address in places:place and name:nameID into places:nameID Thanks
October 1, 201015 yr How do I write a button script that adds a new record in PLACES and then inserts names:home_address in places:place and name:nameID into places:nameID Try (from button on Names layout) Freeze Window Set Variable [ $nameID ; Names::NameID ] Go To Layout [ layout based upon Places ] New Record/Request Set Field [ Places::NameID ; $nameID ] Set Field [ Places::place ; Names::home_address ] Go To Layout [ Original Layout ] Planting the Names::home_address into standard field in Places may not be necessary. I do not understand the relationship between the two tables nor your solution but the Places::Place field may not be necessary ... you can simply place the Names fields directly onto your Places layout. It is only necessary to plant as standard data if it is required for historical purpose, ie, the Names::home_address can change but you need to keep the Places::place the value it was at the time the record was created. Edited October 1, 201015 yr by Guest Changed sentence
Create an account or sign in to comment