Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I tried unsuccessfully to look for the answer in the forum.
I'm trying to create a TalbeBox which may show my the values in my field (CityName) that belongs only to Europe.
I don't have a list of cities in Europe so I have to create one (without changing or creating tables).
I tried to set a group of values in the script this way:
SET Europe='London;Amsterdam;Moscow';
(these are the only 3 cities in my DataBase that belong to this group).
Is that correct?
And now, how can I create a table box that will show only the field CityName in which the value is from that created group?
Thanks!
Hmmm I am not sure how it can be done in Table box. Sorry.
Alternative will be using Sunny's magic trick of using Dim table.
But using the below code we can do this using straight table like:
LOAD * INLINE [
Name
Europe
];
SET vCity = 'London,Amsterdam,Moscow';
LOAD * INLINE [
Dim
1
2
3
];
Use Straight table with
Dimension: Name, Dim
Expession: = Pick(Dim, Subfield('$(vCity)',',',1), Subfield('$(vCity)',',',2), Subfield('$(vCity)',',',3))
Hide the dimension table.
In the presentation tab select the Dim column and hide column check.
What is your expected output should be? You want in your tablebox to display like
Field1 City
Europe London
Europe Amsterdam
Europe Moscow
Is this what you are looking for?
If it is possible i'd like to display it this way:
CitiesInEurope
Moscow
London
Amsterdam
If it is not possible, your way is fine too.
BUT i'd like to make a list of these cities so I can use the list to make this table.
Thanks
Hmmm I am not sure how it can be done in Table box. Sorry.
Alternative will be using Sunny's magic trick of using Dim table.
But using the below code we can do this using straight table like:
LOAD * INLINE [
Name
Europe
];
SET vCity = 'London,Amsterdam,Moscow';
LOAD * INLINE [
Dim
1
2
3
];
Use Straight table with
Dimension: Name, Dim
Expession: = Pick(Dim, Subfield('$(vCity)',',',1), Subfield('$(vCity)',',',2), Subfield('$(vCity)',',',3))
Hide the dimension table.
In the presentation tab select the Dim column and hide column check.
Thank you for helping!
This is what I get when I do so:
which means that for each city in my databse it shown all the cities in Europe.
Ok it worked!
Thank you so much.
How can I make the empty line gone?
Ok based on your plantName what is your expected output should be for the City field ?
Just check No Totals for your expression Plant Name. What table object are you using?
Straight table.
It worked again, thanks!!