Writing to Database from Perspective

I'm new to Ignition, so this post is a little just to get started here.

I'm not as interested in the 'how to' as much as the feasibility of my current project. I want to create a form/page/pages in Perspective that will have something like 600 checkboxes to create a checklist for a project. I'm hoping that I can have multiple users 'checking' items at the same time from different devices, so each change would need to be saved 'onBlur'. I need to pull up the pertinent checklist for a project at any given date from a list of multiple projects. I will also have two text fields for each row that need to save values 'onBlur'.

Some may say, "use a spreadsheet." I want to use Ignition because we are starting to use Ignition in our company for SCADA systems, I really like the database portion, and I want to expand the checklist to be able to save project data for future reference.

  1. Is Perspective an option for creating this project?
  2. Can multiple users be on the same 'session' from different devices at the same time?



Yes perspective could be leveraged for this.

  1. Look into flex repeaters to build out your check boxes dynamically via script. Create an embedded view with a check box that takes a tag path parameter.


  1. For the tag path mentioned above, create memory tags to hold the checkbox values. This way multiple sessions can see and modify the checklist simultaneously.



That idea crossed my mind too but it won't work well for multiple projects all writing to the same tags. I think each check needs to write directly to the database.

I'd be inclined to create a narrow table with the following columns:

  • id (auto-increment, primary key)
  • projectName (or projectId to look up in the project table)
  • taskName (string)
  • value (boolean if only two values but integer would give more options such as % complete)
  • username (the culprit)
  • timestamp

Use a named query to return the values to the form. The query for the project status would be something like,

FROM MyTable t
    SELECT projectName, taskName, max(timestamp) AS MaxDate
    FROM MyTable
    GROUP BY projectName, taskName
) tm ON t.projectName = tm.projectName 
  AND t.taskName = tm.taskName
  AND t.timestamp = tm.MaxDate

A table will probably do for display and data entry.
You'll need some way to tell the other clients to update. The method escapes me right now - although I've done it before.

This database structure gives you the means to revert the project status to a particular time should it be accidentally corrupted. All sorts of other uses could be made of the structure to give timelines, etc., of when various events occurred and how the project progressed.

Ahh yes, I overlooked the bit of it being in a database.

Thanks to both of you! This indeed answers my questions and I will continue working to that end.