Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can I have two fields in one listbox?
For example, my table look like this:
ID, name, InternalCompany, ExternalCompany
1 , Mary , McDonalds, BurgerKing
2 , Jose , BurgerKing, CoffeeStore
3, Lucas, McDonalds, CoffeeStore
I need a Listbox called Company, wich contain McDonald , BurgerKing, CoffeeStore and when I select BurgerKing, the result look like this:
ID, name, InternalCompany, ExternalCompany
1 , Mary , McDonalds, BurgerKing
2 , Jose , BurgerKing, CoffeeStore
Help please!
Hi,
You will need to create a Dimension table with all of the necessary values in. In this case a concatenated load of the first table.... try this.... it will then join in ID and use Company as your list box.....
DATA:
LOAD * INLINE [
ID, name, InternalCompany, ExternalCompany
1 , Mary , McDonalds, BurgerKing
2 , Jose , BurgerKing, CoffeeStore
3, Lucas, McDonalds, CoffeeStore
];
DIMENSION:
LOAD ID,
InternalCompany as Company
Resident DATA;
CONCATENATE
LOAD ID,
ExternalCompany as Company
Resident DATA;
Cheers.
ABY.
But... How connect my dimension listbox with my fields internalcompany and externalcompany
Sent from my Windows Phone
Hi farolito20,
u can write an expression in the listbox as follows:
= ID & ' ' & name & ' ' & InternalCompany & ' ' & ExternalCompany
This should give you the required result
You can try changing your data model to :
ID, name, Company, Type
1, Mary , McDonalds, Internal
1, Mary , BurgerKing, External
2, Jose , BurgerKing, Internal
2, Jose , CoffeeStore, External
3, Lucas, McDonalds, Internal
3, Lucas, CoffeeStore, External
Then you can have Company as the field in the list box. Selecting BurgerKing should filter the name field to Mary and Jose.
But, how connect my listbox with my table?
You change your data model so that it contains Company so the same field will be used for display in the report and for selection.