Update table column with button press

Hello All,

I am still learning about Ignition and am having trouble with the table component in vision. I found that it is not easy to copy and paste down an entire column similar to how one would in Microsoft Excel. I was wondering if there is a script that could update every row in a column by using a button press. In my case I would like to update my column labeled, 'Date'. With this button press I would like to display the current date in the format "M/d/yyyy" with a timestamp of "00:00:00". Is there anyway this could be done? I appreciate any help!



I found a solution that works for my scenario although it does not use a button press. First I created a Memory Tag with the name, CurrentDateMidnight with the datatype as DateTime.

Next, I went to Projects>Gateway Events>Scheduled and created a script that writes the current date and timestamp to the CurrentDateMidnight tag made in the previous step. I set up the Schedule to run at 12:00 AM everyday. The write function uses the CurrentDateMidnight tag and writes the value using the system.date.now() function.

From here I went back to my table and preformed a Cell Update Property Binding to the Data property of the Table. After specifying my rows and column I added the CurrentDateMidnight tag to the value section.

Whenever this scheduled event executes it writes the current date as well as the timestamp it executed. In my case it prints, "mm/dd/yyyy 00:00:00". Depending on the time the scheduled event is planned to execute will determine the timestamp.

FYI, you could make your tag an expression tag with the expression midnight(now()). No need to have a gateway script.


Thanks for the reply! Still very new to SCADA and often find myself reinventing the wheel. I like this better and will use this from now on.