Dot walking script help

cpinedatx94
Tera Expert

I need help writing a script with dot walking. I have a reference field on my form (Candidate) and i want my script to pull a field from that record (clearance type) and then set the value of a field on my current form to that. With the help of ChatGPT ive come up with this, but it appears to not be working. Can someone help me out please.

 

 

 

 

function onLoad() {
   //Type appropriate comment here, and begin script below
   var clearanceType = g_form.getReference('u_candidate').clearance;
alert(clearanceType);
g_form.setValue('u_req_clearance',clearanceType)
}

 

 

7 REPLIES 7

Thanks for sharing more details, i got it, the table ( Local technician table ) has list of candidate record with pre-configured clearance type ( which is select box type ) for each candidate. 

 

Are you working on catalog item form , if yes then you can utilize the auto-populate option for setting this clearance type. ( version dependent, check if its available ) 

 

What's the output of alert, is it getting the correct clearance type for selected candidate.

 

 

 

 

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

This is a work order order form. im not getting any results from the client script except this

replace the alert and test

alert(clearanceType.getValue());

Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution