Hi,
I have a table with some boxes that are labeled with an ID (box_id) and they all go through the same processor.
I also have a table with two collumns (Box_id and processing time) [cf. image].
How can I make my procecssor have a processing time that corresponds, regarding the table?
I naively tried this :
Table qer = Table.query("SELECT [Processing time] FROM [Magical Boxes] WHERE BOX_id == $1", item.labels["box_id"]); return qer[1];
but it didn't work. I also tried to label the processor with the corresponding value, but the problem seems to come from the fact I cannot get the value from the table with the query.
Thanks,
--- EDIT ---
Using this in the processor worked.
query("FROM [Magical Boxes] WHERE BOX_id == $1", item.box_id); return Table("Magical Boxes")[getquerymatchtablerow("Magical Boxes",1)][2];
--- EDIT 2 ---
After Mischa Spelt's comment, a better way would be to simply return qer[1][1] (faster and the first uses a deprecated command)