Clear a specific cell

Clear a specific cell

marian_cretu
Contributor Contributor
8 Views
2 Replies
Message 1 of 3

Clear a specific cell

marian_cretu
Contributor
Contributor

[ FlexSim 20.2.2 ]

Hello guys,

Is it possible to clear a single table cell (without clearing the entire table) ? table[1][1] for example.

I want to clear it - not to make it equal to something. Just clear and set the cell type to number int.


Thank you.

0 Likes
Accepted solutions (1)
9 Views
2 Replies
Replies (2)
Message 2 of 3

cliff_king
Not applicable
Accepted solution

There is not a picklist option in the global table's On Reset trigger field to clear a single table cell, but you can use the Code Snippet option to write your own statement of course.

Your statement will look something like this if written in the table's own On Reset trigger because the table is the "current" object: current[5][3] = 0;

When writing the code elsewhere, you need to use the Table constructor like this Table("myTable")[2][1] = 0;

Here's more information about Tables:

https://docs.flexsim.com/en/20.2/Reference/Tools/GlobalTables/#types

Here's more information about the Table constructor:

https://docs.flexsim.com/en/20.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Table.html#Me...


0 Likes
Message 3 of 3

Ben_WilsonADSK
Community Manager
Community Manager

Hi @marian.c2, was cliff.king's answer helpful? If so, please click the red "Accept" button on their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes