5 Replies Latest reply: Feb 11, 2015 5:35 PM by Peter Cammaert RSS

    Create concatenated string variable

      Hi All,


      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);

      Next i


      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.


      I don't have any good ideas for the exclusion.


      Any ideas welcome.