Referenced field autogenerate with scripts

Hi @Sebastian,
Please any help with how I can auto generate data from a referenced field using scripts ?
See sample of what I am trying to achieve below in red!

Unfortunately it is not possible. There is a feature request since several months, but i cannot implement it, when the scripting engine does not support it.