Login
Register
Home
Q&A
Questions
Tags
1.2k
questions
1.4k
answers
361
comments
339
users
Categories
All categories
Send feedback
Sidebar
Automatically saving to a system variable table
0
votes
1.0K
views
asked
Mar 27, 2018
by
maria-j-3133
(
220
points)
Is there a way to save, add and update values in a system variable table automatically?
I am looking into receiving MRN numbers from a hospital and saving/updating the cross reference table I have for that hospital.
system-variables
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
You can update a system variable. Here is a KB on how to do this.
https://www.qvera.com/kb/index.php/1188/can-i-programmatically-add-entries-to-a-table?show=1188#q1188
The system variable table lookup is designed for static lookups that have occasional updates. If you have a table that is constantly being updated you should use a database table instead. The database table allows you do run select and update statements for individual rows in the table. To update a system variable table, you have to retrieve the entire table, modify it and set it back.
Also, system variables are not thread safe. If you have "First in First Out" checked on the channel you can do this. If not then you can have 2 messages update the system variable table at the same time and lose one of the updates.
answered
Mar 27, 2018
by
brandon-w-8204
(
34.1k
points)
edited
Mar 27, 2018
by
brandon-w-8204
asked
Mar 28, 2018
by
maria-j-3133
(
220
points)
When I create a system variable table, I do not see the setVariable() check box. Am I missing something?
commented
Mar 28, 2018
by
maria-j-3133
(
220
points)
Will this check the table to see if the entry already exists? Is there a way to do that?
commented
Mar 28, 2018
by
brandon-w-8204
(
34.1k
points)
Any updates to the table have to be done by retrieving the table. Doing your own check for existing values with a script and putting the entire table back. A database is recommended for what you are looking to do.
commented
Mar 28, 2018
by
maria-j-3133
(
220
points)
If we were to use and set up an external database, can we automatically add from Qvera the same way?
commented
Mar 28, 2018
by
brandon-w-8204
(
34.1k
points)
QIE supports external databases and you can do select, update, and insert statements against them from within any interface.
Please
log in
or
register
to add a comment.
...