We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Quality Gate Status Falied on Catalog Client Script

Esteban_Neri
Tera Contributor

I created a Catalog Client Script to auto-populate a field in a form based on "Assignment Group" field. The info of that field is used in a Flow action to populate assignment group on a new SCTASK. It works fine if I use the sys_id in the script, however I'm now required to do it using system properties to pass quality gates. Could you please advice on the easiest way to implement this?

 

Client Script Code:

function onLoad() {
    //Type appropriate comment here, and begin script below
    var ig = g_form.getValue('assignment_group');
    // Assigment group IG sys_ID: ##########################
    // Assigment group IT sys_ID :##########################
 
    if (ig === '##########################') {
        g_form.setValue('field_it_1_1', '##########################');
        g_form.setReadOnly('field_it_1_1', true);
    }

    /*This is approach is good to set the value of IT fields, however to populate assignment group on SCTASKS created using flow action "New Create IT Tasks" does not work, assignment group shows empty.
 
        var assignment_group = g_form.getDisplayBox('assignment_group').value;
        if (assignment_group === 'IG_group') {
            g_form.setValue('field_it_1_1', 'IT_group');
            g_form.setReadOnly('field_it_1_1', true);
        }*/

}
1 REPLY 1

Brad Bowman
Mega Patron

You should use GlideAjax to call a Script Include which will simply use gs.getProperty to return the value of that property to the client, which you can then use to set the variable value.