question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Ankur A3 commented

Array Label is Not Showing Values

Hi Team,

I am generating tokens and appending values to array. But array is not showing values as [1,2,3,.....].

1652588778608.png

Can you help to understand what is going wrong here?

ArrayLabelNot ShowingElements.fsm

Thank you!

FlexSim 21.0.10
labelarrayvalues
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
1 Like"
Felix Möhlmann answered Ankur A3 commented

'append()' adds an array to the end of another array. In your code, you are passing in a number though, which gets interpreted as an (empty) array with a length corresponding to the number.

Either pass in the number as an array of length one by enclosing it in [] brackets. Or use array.push instead, which is used to add values to the end of an array.

  1. array.append([Counter]);
  2. array.push(Counter);
· 5
5 |100000

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