In my table I have a "AllCustomers" flag field (1=select all customers, 0=select specific customers) and a "SpecificCustomersList" multiple select list (varchar linked to a lookup table)
In the "Client side events" of the AllCustomers field, if the user set "AllCustomers"=0 I want also to clear the SpecificCustomersList field, but the following code doesn't work: the field is set visible or not in the right way, but the list is not cleared. How to do this?
{ // keys = event types, values = handler functions
"change": function(e) {
if ($(this).val() === "1") {
$(this).fields("SpecificCustomersList").visible(true); // this works
} else {
$(this).fields("SpecificCustomersList").visible(false); // this works
$(this).fields("SpecificCustomersList").val(''); // this doesn't work, also tried value('') and value(null)
}
}
}
I have also other similar scenarios where I need to clear a multiple file upload field. How to clear it in the Client side events?