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 )

Add Comment
3 Answer(s)

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);

Agile Angel Answered on September 11, 2016.

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}”

on February 27, 2017.
Add Comment

thank you!

Agile User Answered on September 12, 2016.
Add Comment

@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);

Agile User Answered on August 29, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.