Sidebar

Deleting system variables by script

0 votes
313 views
asked Jun 25, 2019 by maria-j-3133 (220 points)
I currently have an interface that pulls in a system variable table from a CSV that is sent to me. I use it for cross referencing purposes on an interface. My question is, is there a way to delete an individual row of the system variable table after that row is used in the cross referencing?

1 Answer

0 votes
Yes you can however there are some considerations.

1. To update a system variable you have to retrieve the entire variable,  modify it and then save it back.

2. Doing this update is not thread-safe so you have to use "First in First out" on the channel and this can have performance concerns.

I would suggest that you load the CSV into a database and  in the channel, use SQL commands to delete the row. This doesn't require loading every record and is thread safe allowing you to process more than one message at a time. You can also import any new records into the database as you receive files and not have to merge them in.
answered Jun 25, 2019 by brandon-w-8204 (33,270 points)
...