How do I sum the values of a column of a table component?

Hello Felipe,

summing up the hfiNumber for a specific machine and a specific date could be done in SQL. As I’m using MSSQL, I’m not 100% sure about the correct syntax for MySQL.

SELECT 
    SUM(hfiNumber) as hfi
    , date(timeStamp) as dt
FROM hfi
  
where
	machine like 'Cupper'
	and HOUR(dt)>=7 and HOUR(dt)<19
group by date(timeStamp)
order by dt

This should give you the sum of hfiNumbers for the Cupper machine for the 7am to 7pm shift for each day.

In order to edit or delete a line you just need to read the selectedRow property of your table, get the values (see http://forum.inductiveautomation.com/t/how-to-extract-the-value-of-the-selected-row/8817) and then run the wanted SQL update or delete command.