OK. So I configure the strategy to initialize when it runs. Works great. I
But I want it to be persistent so I configure the table accordingly and presto!
It’s baaack…
The way I made it go away the first time was to delete and recreate the table. After messing with it for awhile I found I could remove the offending element while the strategy was running, apply it, and then it wouldn’t come back.
If you are initializing a persistent variable every time your strategy starts - then it doesn’t need to be a persistent variable. A regular variable will do the same exact thing. Typically I conditionally initialize persistent variables so they have sane values on a newly programmed controller:
if(nMyPersistent_pstv == 0) then
nMyPersistent_pstv = 500; //Set to sane default - this will only ever get called one time (unless the user sets the value to 0 or we download to a new controller
endif
When you removed the initialization statement, the persistent var, still “persisted” with the last value you gave it - restarting the strategy will not clear persistent vars, that is the whole point of them.
The way you are using your string table - you probably don’t need a persistent table. If you wanted to be able to change the names of your sets without having to perform a download, then you would have them be persistent and you would NOT initialize them in the strategy - you will fill them in at runtime or perform a conditional initialization like I showed above.