Alert logs

I’m having difficulty working with an alert database table. i cant get the table to create automatically so i have created manually. most things appear to be working but i can not get the column Alert_Log_Id to populate. i currently do not have it as the primary key, when i tried creating as the primary key nothing got written to the table at all. I would like to use the ID as a method of easily selecting alarms in a table.

Since I can not get the ID to populate i am trying to select individual alarms using the Active_Timestamp column but am having trouble with the date format when i try to use it in my query’s.

Can someone either tell me how to get the log_Id to populate (preferable) or let me know the errors of my ways in my attempts to work with the timedate column?

thanks, Scott

You should really let Ignition create the table for you. What I would do is drop your alert log table. Restart Ignition. Make an alert occur and the table should get created for you.

Thanks, will give it a try.
can you tell me if the Alert_Log_ID column should be populated with a unique integer?
I looked in a demo app. and it too was not populated.
Scott

The primary key (alert_log_ndx) should be an auto-incrementing key.

Yep, just got it to autocreate and found that out.
Did not realize the table did not get created until an alarm was triggered so figured it was not working.
Thanks for your help.
Have a good holiday!