question

Julio R avatar image
0 Likes"
Julio R asked Felix Möhlmann answered

Getting values from a list leaving the values on the list

Hello,

I am using this code to get the informarion out of a list (simplified without the future query)

Variant aa = List("Lines").pull("",0,0);

return aa;

Whenever there is only 1 value on the list it works fine, but if there is more than one value it returns a NULL value, what am I doing wrong?

FlexSim 24.0.0
listcodequery
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

The "requestNum" parameter is 0. So the only unusal behaviour is that an entry is returned as long as there is only one.

If you set the requested number to a large number (or, as in the example to the number of entries on the list) it will correctly return an array of all values on the list.

Variant aa = List("ItemList1").pull("", List("ItemList1").entries().length, 0, 0, 0, LIST_DO_NOT_REMOVE);
return aa;
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.