question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Matthew Gillespie commented

How to reference values in an array in a table cell

I have global tables for which the cell format is array so that I can put many values in each cell.

What is the correct syntax to reference a specific value in an array in a cell?

For exemple, I reference the cell with Table("Interventions")[i][5] but that gives me the whole cell content. I just want to reference one value in the array in the cell.

By default all arrays in every cell have the same name: Array[1]

Thanks,

FlexSim 20.0.2
tablesarrayreference
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

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

Here are a few ways you could do it:

  1. return Table("Interventions")[i][5].as(Array)[2];
  1. Array array = Table("Interventions")[i][5];
  2. return array[2];
  1. return Table("Interventions").cell(i, 5).value[2];
· 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.