Idea

Sebastian Hemmann avatar image
3 Likes"
Sebastian Hemmann suggested Jason Lightfoot commented

Clear rows or columns of a global table

What do you think about a method tonot clear a complete global table but only one/some rows or columns. Actually I´m allways doing this with for Loops.

global tables
· 2
5 |100000

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

Przemyslaw Pasich avatar image Przemyslaw Pasich commented ·
Agreed, something along the lines of Table.clearCol(3) to clear a specific column; plus an option to pass an array like Table.clearCol([3,5,6]) to clear a few columns with a single command.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Przemyslaw Pasich commented ·
Table.query("UPDATE GlobalTable1 SET [Col 1]=0,[Col 3]=''")
1 Like 1 ·

1 Comment

Ben Wilson avatar image
2 Likes"
Ben Wilson commented Axel Kohonen edited

FlexSim 2017 Update 1 (just released in beta [2017-03-08]) adds a reset trigger to global tables that could fulfill this request.

It allows users to put custom reset code right on the global table itself, so that the table can be reset to whatever custom state your model requires, and keep that reset logic directly with the global table itself.

· 2
5 |100000

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

Axel Kohonen avatar image Axel Kohonen commented ·

@Ben Wilson,

I think it would be great if one could clear a certain row or column with the clear command, e.g. using optional parameters like Table.clear(row or column, row/column number). The loop solution obviously works, but allowing the user to clear the whole row or column with one command would be more user friendly.

Axel

2 Likes 2 ·
Cameron Pluim avatar image Cameron Pluim commented ·

@Ben Wilson I think what sebastian is suggesting is basically an addition to Table.deleteRow. Currently, you can use Table.clear to remove all values from a table, or Table.deleteRow to delete a specific row. Deleting multiple rows, but not all requires a for loop to delete each row specifically. It would be helpful if you could use Table.deleteRow(startingRow, EndRow) where it will delete all the rows within the range specified.

0 Likes 0 ·

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.