Trying to populate custom field with Work Order # using a script

Trying to populate custom field with Work Order # using a script

Is there a way to populate the Work Order number into a custom field using a script? So far I am unable to figure one out. I can only populate the field with a set text. Any ideas?

                  New to ADSelfService Plus?