question

Sinisa avatar image
1 Like"
Sinisa asked Mischa Spelt commented

Calculate in the Global Table?

Hey guys :)

I have a problem , i want to, for example multiply in a new row the variable(Laenge*Breite*Hoehe) like in excel , is this possible ? (Can i add formulas)

Thanks

FlexSim 17.1.2
global tableformulacalculating
calculate.png (6.0 KiB)
5 |100000

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

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Matt Long commented

You can put a formula in a cell, but it won't display the calculated value - you'll only be able to evaluate the formula and get the calculated value when you ask for it.

If you set the datatype of the column to FlexScript you can then enter a formula in FlexScript:

  1. Table table = Table("GlobalTable1");
  2. return table[1][1] * 10;

Then you can get the value out like this:

  1. Table("GlobalTable1")[1][2]

That will execute the code in that cell and return the calculated value.

· 1
5 |100000

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

Matt Long avatar image
1 Like"
Matt Long answered Mischa Spelt commented

Unfortunately FlexSim does not support formulas in tables. You would have to write code somewhere outside of the table to update the table's cells. Or if you only need it on reset, you could use the Global Table's On Reset trigger.

If you'd like to see this feature added to FlexSim you could repost this as an Idea in the Development space. This allows users to vote on the idea and tells the developers which ideas are popular for future releases.

· 3
5 |100000

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