As per my understanding you want to reduce the list dataslot values from 5 to 2. If you are doing it in pre/post scripts of worksteps then jst.putDataSlot is fine but on form you have to use bean.setPropString().
Besides this you have to do some java coding for this.
No, that's not exactly what I want; suppose I've got a DataSlot of type List with the following values ["first element", "second element", "third element", "fouth element", "fifth element"] and now I want at the end of the WS change "second element" into "new second value". The number of elements stays the same and the values of the other elements too. I thought something like putDataslot("mylist", "new second value") but that doesn't work.
Please try the following code in post script of that workstep -
java.util.ArrayList lst=jst.getDataSlot("Name of dataslot");
jst.putDataSlot("Name of dataslot",lst);
Hi Ram Sharma,
That didn't solve my problem; however Venkat came with the following solution: