api – clear a field / cell – multilist
how can i clear a value of a field in a multilist field which has no ” ” valid value?
(doing cell.setvalue(“”) wont work because it counts as a non valid value )
To update a multilist field, it is necessary to set always a IAgileList also in case of empty values.
ICell cell = ……
IAgileList values = (IAgileList) cell.getValue();
values.setSelection(new Object[] {});
cell.setValue(values);
Hi,.
I tried the above code to set a list to null value in groovy script. I get compile time error when used above code.
When I try the below, there is no compile time error but fails when the PX is executed.
values = (IAgileList)cell.getAvailableValues();
values.setSelection(new Object[1]{});
cell.setValue(values);
Error seen:
“No signature of method: [Ljava.lang.Object;.call() is applicable for argument types: (AgileGroovy2476728$_invokeScript_closure1) values: {AgileGroovy2476728$_invokeScript_closure1@6955ba59}”
@sf_dudu13 I’m curious if you ever had to clear a Cell that was NOT a MultiList Value? It seems the API sets the Cell Value to Empty String (“”) if you use setValue(1234, null);