Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello! I am trying to use a variable to define a list that I use later in the load script to narrow down the number of entries in a table. To create this list and use it in a Match function, I am using single quotes around each item using chr(39). Here's what that looks like in my script:
Valid_Keys:
Load
chr(39) & Concat(Distinct Product_Key, ', ' ) & chr(39) as Valid_Key_List
Resident Positions;
Let vValid_Key_List = Peek('Valid_Key_List', 0, 'Valid_Keys');And when I reference this variable in the Match function:
AccountFinal:
NoConcatenate
Load *
Resident AccountExpanded
Where Match(Product_Key, $(vValid_Key_List));Problematically, when I do this, the resulting table is completely empty. When I Trace the variable just to test it out, it comes out as the following:
Where Match(Product_Key, ''Alternatives|Alternative Strategies|Alternative Strategies'', ''Alternatives|Capital Call Structures|Capital Call Structures'', ''Annuities|Fixed Annuities|Fixed Annuity'')
In the output it's clear that between each value is two single quotes...I'm extremely confused as to what is happening here and would appreciate any help in figuring out how to correctly assign and call this variable.
Thank you!
Try this
Load
Concat(Distinct chr(39) & Product_Key & Chr(39), ', ' ) as Valid_Key_List
Resident Positions;