LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to clear table on button click

at run time i am entering data in table,
i want to clear the entire table on button click.In the same run.
Help me please.
0 Kudos
Message 1 of 4
(4,710 Views)
In short, because the table is a control, you'll need to use a local and write an empty string array to it.

The button should be latched (right click on it on the front panel and select mechanical action->latched until released) and wired to a case.
Right click on the table on the diagramme and select create local. Place the local inside the true case. Right click on the local and select create constant, and wire that constant to the local.

If the clear operation needs to be done at a specific time (you want to read the table just prior to reading the button click e.g.) make sure the data flow ensures this.
Message 2 of 4
(4,710 Views)
Hi mads
thanks for ans.
my problem is solve now
0 Kudos
Message 3 of 4
(4,711 Views)

 

This may help someone else in the future, it took me awhile to figure this out.  When you create the array constant, make sure that the table cells are blank first or the constant will just rewrite those values to the cells.

 

0 Kudos
Message 4 of 4
(4,515 Views)