How to use an onChange Script on a Selection list or another field to set a caption of another field?

How can I change the caption of an field in a scree by using onChange of another field or a selection list? I have tried following code but din't work.

if(this.value == 'value1'){
field_id.Caption = 'value2';

Parents Reply Children
No Data