Custom Script Help needed - adding value from main DocType in Child table

Thanks to @NCP in another thread I’ve finally figured out what I did wrong.

When referring to a Child Table I was using the name of the Child Table but I should use the name of the field that shows the Child Table in the Parent DocType.

@brian_pond That is the reason why your script at my side was not working… now it does perfectly and as expected!

Thank you both!