Hello all, I am new to Ignition and not a developer by education/trade. I am looking for some direction to achieve the following:
I am trying to create a data entry form for operators to use on the floor. The page will contain machine parameters with their target and tolerance ranges for each setpoint as shown below.
I need to have a vertically oriented data entry section to the right of this table. The idea is that operators are presented with the target ranges and then input the setpoint actually used.
My first thought is to use a table with a single column, and blank cells for each row in the reference table. Users would enter in settings and then press an enter button which would add the data in each cell to a new row in a historical table (see schematic below).
The hope is that using a single-column table would be a more elegant solution than adding 70+ numeric text fields. I am also hoping to bind the number of rows presented in the single-column “entry” table to the number of rows in the reference table shown earlier.
To summarize, my questions are:
Can cells in an editable table be used to set values for an INSERT query?
Can the number of rows displayed in a table be bound to the number of rows in a different table?
Let me know if this is possible in perspective. Any relevant documentation or tips are greatly appreciated!
Yes, but in your example you seem to be pivoting the table, so in this case isn't your requirement to bind the number of rows in the first table to the number of columns in the second?
Have you looked at the Flex Repeater Component? This only requires you to create a single 'template' input, which can then be repeated. It can give you a bit more flexibility in the UI design.
Tables are perfectly fine to use though, just trying to expose some different options
Have a look and let us know if you have any other questions.
I followed some tutorial videos and got a flex repeater working. However, I think for aesthetic purposes I would prefer to move forward with using tables.
My next question seems very simple, but I have not found an answer online that makes sense to me:
I need to have the "entry" table to have the same number of rows as the reference table. I managed to do this by creating a query that looks at the database table that the reference table is pulling from and returns blank values for each row. However, the cells are no longer editable.
Here is the query I used:
SELECT '' as Target
FROM referenceTable
I have looked through the following thread which appears to address something similar, but I had no luck by adding a column instance.
I do not need to dynamically create columns, so I did not include the code.
The next step will be to loop through the entry table and add the entered values to a list. I have also been struggling with this. It seem "toPyDataSet" does not work with perspective tables.
That answer was for a very old 8.0 version of the perspective table and should not be assumed to be current, everything 8.0 was in a lot of flux. I assume you’re using 8.1, so it might not apply at all or there might be much easier ways to accomplish it.
I’d give a good answer if I could, but I haven’t worked with it in over a year now.