How to apply condition on list collector variable

poornima batchu
Tera Expert

Hi all, 

I created a list collector-type variable on the sys_user table. I want to apply a condition on this variable so that it has to take only 1 value instead of multiple values

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

Better to change the variable type to reference rather than trying to make a dog act like a cat, but if you must you can write a simple Catalog Client Script:

function onSubmit()
    var values = g_form.getValue('variableName').toString().split(',');
    if (values.length > 1) {
        alert('Please select only 1 choice');
        return false;
    }
}