I have a problem that I hope someone can help me solve. I have a dashboard that displays trade information. The users have a list of CUSIPs - just strings - that they want to use to either use as the search condition or use as a list to exclude in the search. The don't always want to apply this filter, so it should be a button/check box.
For the first case, I tried to create a list of CUSIPs from the user table delimited by a pipe in order to use a Select in Field action. Here is my code in the load script:
let vCusipList = Text(peek('CUSIPtoExclude',1)) ;
FOR i=2 to NoOfRows('ExcludeCUSIP')
let vCurrent = Text(peek('CUSIPtoExclude',i));
set vCusipList = $(vCusipList) & '|' & $(vCurrent);
It appears that this code is running correctly in debug, but I can't display the final value of vCusipList. Is there a limit to the lenght of a variable? There are over 400 CUSIPs in the list.
The script line error is caused by the vertical bar between two large numbers. Vertical bar is no known operator. You have to turn everything into a string for the concatenation operators to work.
As far as I know, there is no size limit for variables. To verify this, I ran a script that doubled the string content of a variable in a loop that ran 10**7 times. It kept going for three weeks without error ,and then I got tired.
There may be a search field size limit though. Didn't test that (yet)...