Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Client script 'if not' is not working

Srvs
Kilo Guru
function onLoad() {
    if (!('u_managed_by_last_certified' == '' || 'u_managed_by_last_certified' == null)) {
        g_form.setValue('u_verification_method', 'Data Certification');
        g_form.setValue('u_last_verification_date', g_form.getValue('u_managed_by_last_certified'));
    }
}
 
the above script is not working, please help if anyone has faced this type of issue.
1 ACCEPTED SOLUTION

Harish Bainsla
Kilo Patron

Hi @Srvs  try below code

function onLoad() {
var managedByLastCertified = g_form.getValue('u_managed_by_last_certified');

if (managedByLastCertified !== '' && managedByLastCertified !== null) {
g_form.setValue('u_verification_method', 'Data Certification');
g_form.setValue('u_last_verification_date', managedByLastCertified);
}
}

View solution in original post

1 REPLY 1

Harish Bainsla
Kilo Patron

Hi @Srvs  try below code

function onLoad() {
var managedByLastCertified = g_form.getValue('u_managed_by_last_certified');

if (managedByLastCertified !== '' && managedByLastCertified !== null) {
g_form.setValue('u_verification_method', 'Data Certification');
g_form.setValue('u_last_verification_date', managedByLastCertified);
}
}