question

lyn-lyn11 avatar image
0 Likes"
lyn-lyn11 asked Xavier Low answered

SQL query objects from calculated table

I making statistic collector which each row will query the "Elevator" status from calculated table. However, the elevator stored in calculated table is in Object, but the statistic collector is query using string. How to convert calculated table object to string?

return Table.query("SELECT Idle FROM [AMR Lift Utilization] WHERE Elevator = $1",data.token.Lift)[1][1];

FlexSim 24.1.0
sql queries
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

Xavier Low avatar image
0 Likes"
Xavier Low answered

Hello @lyn_lyn11 ,

If you want to just get the Elevator object name instead of the object itself, based on the example you have provided, you can do: data.token.Lift.name

Hope this helps.

5 |100000

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