Programmatically set column options and select the referenced table

Hi @Jono_Bouwmeester , I’m unable to send a sample Coda page but please see screenshots below.

I have a Favorite Fruits table using cross-doc pack and referencing this from another document “Group Specific Doc”. The Fruit column contains values from a look up table. (See first table in screenshot)

I don’t want to create the pack table coming from “Group Specific Doc” for Fruit column, but instead I already have a Fruits table in my current doc “Master Group doc”. (See 2nd table in screenshot)

I understand that with cross-doc, the references will be broken. Now, I have a local table in “Master Group doc” where I want to copy values from the cross-doc table to a Target table but this time also fixing the references where Fruit column points to Fruits lookup table. (see 3rd table in screenshot)

After clicking “Copy to Target Table” button to populate copy rows from cross-doc table to Target table, I set the Fruit column of the Target Table to be a select list from Fruits table. and the Fruit column values are no longer grayed out and its reference is no longer broken.

However, clicking “Copy to Target Table” breaks the reference again. Is there a way to programmatically set column options and set the column’s lookup table to Fruits.

Or perhaps, how can I copy values of list column to target table with fixed references?
image

Thanks so much!