Hi @gnuklear, here's a quick little script to apply an Object Style to every graphic in a selected table. The idea is that you set the Size and Position and/or Frame Fitting Options of the object style. In the script, edit this line, replacing Table Graphic with the name of your object style:
var objectStyleName = 'Table Graphic';
Example Object Style settings:


You will see that the script uses the exact suggestion that @Laubender made. Let me know how it goes.
- Mark
/**
* @file Apply Object Style to Table Graphics.js
*
* Applies the specified object style to all graphics of selected table(s).
*
* @author m1b
* @discussion https://community.adobe.com/t5/indesign-discussions/reference-an-anchored-frame-in-a-table-cell/m-p/14562435
*/
function main() {
// you must edit this to match your object style
var objectStyleName = 'Table Graphic';
var doc = app.activeDocument,
items = doc.selection;
if (0 === items.length)
return alert('Please select some page items and try again.');
var objectStyle = doc.objectStyles.itemByName(objectStyleName);
if (!objectStyle.isValid)
return alert('Could not find "' + objectStyleName + '" object style.');
for (var i = items.length - 1, item; i >= 0; i--) {
if (
items[i].parent.hasOwnProperty('tables')
&& items[i].parent.tables.length > 0
)
items[i] = items[i].parent;
else if (0 === items[i].tables.length)
continue;
// apply the object style to each graphic of each table of each item
for (var j = 0; j < items[i].tables.length; j++)
for (var k = items[i].tables[j].allGraphics.length - 1; k >= 0; k--)
items[i].tables[j].allGraphics[k].parent.appliedObjectStyle = objectStyle;
}
};
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Apply Object Style to Table Graphics');