Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have these tables:
Catalog:
load * inline [
Code, Description
1000, New York
6000, Las Vegas
6005, San Jose
6007, San Francisco
0, No Name];
Airlines:
load * inline [
Airline, CodeList
1, '1000,6005,0'
2, '6007,6005'
3, 6000
4, '0,1000,6007,6000,6005'];
Catalog in ListBox1 and Airlines in ListBox2
I need to show in ListBox2 all the records selected in ListBox1 comparing them with CodeList field.
Example if in ListBox1 the user selected : 6000,6007. I need to Select in ListBox2 these records:
Airline, CodeList
2, '6007,6005'
3, 6000
4, '0,1000,6007,6000,6005'
Any ideas?
I attached the sample file.
Thanks in advance.
Or may be this:
='(' & Concat({<CodeList = {$(=Chr(39) & Concat('*' & Code & '*', Chr(39) & ',' & Chr(39)) & Chr(39))}>}Airline, '|') & ')'
The CodeList values in the Airlines looks a bit weirdly formatted. almost as something went strange in a load from delimited text file.
Could you share source file that were loaded from ?
Try something like
=Aggr(
If(Wildmatch(CodeList,$(=chr(39)&'*'&Concat(Code,'*'&chr(39)&','&chr(39)&'*')&'*'&chr(39))),Airline&'-'&CodeList)
, Airline)
Or may be this:
='(' & Concat({<CodeList = {$(=Chr(39) & Concat('*' & Code & '*', Chr(39) & ',' & Chr(39)) & Chr(39))}>}Airline, '|') & ')'
Hi,
one solution could be also:
or maybe
Catalog:
LOAD * Inline [
Code, Description
1000, New York
6000, Las Vegas
6005, San Jose
6007, San Francisco
0, No Name
];
Airlines:
LOAD Airline,
Text(CodeList) as CodeList
Inline [
Airline, CodeList
1, '1000,6005,0'
2, '6007,6005'
3, 6000
4, '0,1000,6007,6000,6005'
];
tabLink:
LOAD Distinct
CodeList,
Trim(SubField(CodeList,',')) as Code
Resident Airlines;
hope this helps
regards
Marco