Skip to main content
The way to achieve your own success is the willingness to help somebody else. Go for it!
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

variable help

Hi All,

Please help me in this scenario.

I have a Country table.

Here I need to store few of Countries into one variable and remaining into another variable.

For example, table contains 75 countries.

#Create Variable1 for 25 Countries;

#Create Variable2 for 50 Countries ;

How to achieve this requirement??

I've tried with Concat to store all Countries into the variable


Concat(Distinct Country,',') as Country



Group by Country; 

Let _VallCountry=Peek('Country');

But how do store specefic Countries into variable kindly help.


5 Replies
Partner - Creator III
Partner - Creator III


i don;t know your criteria for storing into the variables but you can do something like this:

1. have one variable with all the countries (just like the one you created)

2. make 2 new variables one containing the first 25 and the second with the rest of them

let v1=mid(vconcat,1,Index(vconcat,',',25));

let v2=mid(vconcat,Index(vconcat,',',25));

hope it helps,



Try this?


Load Country, Recno() as RecNo From Table;



Load Country, 1 as Flag, Concat(Country,',') as Concat Resident Table Where RecNo>=1 and RecNo<=25;

Load Country, 2 as Flag, Concat(Country,',') as Concat Resident Table Where RecNo>=26 and RecNo<=50;

Load Country, 3 as Flag, Concat(Country,',') as Concat Resident Table Where RecNo>=51 and RecNo<=75;

Drop table Table;

LET Var25 = Peek('Flag',0,'Final');

LET Var50 = Peek('Flag',1,'Final');

LET Var75 = Peek('Flag',2,'Final');

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Creator II
Creator II

Thanks for all your responses.

The ultimate requirement is,

I need to write expression for conditional display values in list box.

If I have variables for both it will be easy to write condition else I need to write manually.

Partner - Creator III
Partner - Creator III

Can you give as an example of what that listbox should look like?

Creator II
Creator II

I have two list boxes Country and Region contains

Country - there are 60 countries

Region contains -E, W, N, S

Now I need to display values based on Specific Country selections.

For example, US and UK and Canada need to restrict all Regions except Region "S"

and Remaining Countries restrict only Region "S"  .

I have done in script and not working as I expected.



If(Match(Country,'US ','UK','Canada'), Pick(Match(Region,'S'),Region) ,

If(Match(Country, all remaining countries except UK,US and Canada),

Pick(Match(Region,'N','E','W'),Region,Region,Region))) as Region

from <table>;

Please correct me in this.where I made wrong..!