Unable to UI actions on the Worspace level

XYD23
Tera Contributor

I have written client script (onChange) which is working fine on the form level, but on the workspace level the script is working ie able to see the message but ui action is not getting hidden.
Client Script:

function onChange(control, oldValue, newValue, isLoading, isTemplate) {

    var fields = g_form.getValue('number');
    if (!fields) {
        g_form.addErrorMessage('Please Fill the Number field');
        $$('button[data-action-name^=id_display],button[data-action-name^=resolve_incident],button[data-action-name^=tech_d]').each(function(e) {
            e.hide();
        });
    } else {
        g_form.clearMessages();
        $$('button[data-action-name^=id_display],button[data-action-name^=resolve_incident],button[data-action-name^=tech_d]').each(function(e) {
            e.show();
        });
    }
}

Isolate script is set to FALSE.
2 REPLIES 2

Anirudh Pathak
Mega Sage

Hi,

Why you are not using UI Action's condition field to show/hide the UI Action?

Need to hide more than 2-3 ui action for one condition