Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Can we use target.field in source script?

SD40
Tera Contributor

I have a requirement that is- 

If the target field value is empty then only return the source.field value to the target field.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can try to access it; if it doesn't work then don't use field map for that target field

instead use onBefore transform script

if(target.fieldName.nil()){

target.fieldName = source.u_fieldName;

}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

sawyan3
Tera Contributor

find_real_file.png