Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In a table there is a string column that contains several values separated by a comma and surrounded by brackets or the indication N/A (not available)
I need following:
The option "at least one" or the option"all" of the selected values should be indicated via a switch (using e.g. buttons and a switch variable):
In case of choosing the option "all" I should get this result:
In case of choosing the option "at least one" I should get this result:
Included the qvw file Split_String_List.qvw where the table is loaded and a listbox, two buttons, a straight table and a variable is put on the sheet Main.
Thanks
R.W..
Not sure, but why don't you try to create METAVALUE using SubField function
Data:
LOAD ID, META INLINE [
ID, META
1, '(main,person,address,career,income)'
2, '(main, profession,address,income,contribution)'
3, '(address,career,contribution)'
4, N/A
5, '(person,profession,career)'
6, '(address,profession,income,contribution)'
7, '(address,main,person,income)'
8, '(income,person,address,profession,career,contribution)'
9, '(main,person,address,profession,career,income,contribution)'
10, '(main,career)'
11, '(person,main,address)'
12, '(person,profession,career,income)'
13, '(main,profession)'
14, '(career,address,profession, income,contribution)'
15, '(main,person,address,profession,career,income,contribution)'
16, '(profession,person,address,contribution)'
17, '(career,address,income,contribution)'
18, '(main,career)'
19, '(main,address,profession,career,income,contribution)'
20, '(address,person,income)'
21, N/A
22, '(person,main,profession)'
23, '(career,main,person,profession,income,contribution)'
24, '(main,contribution)'
25, '(main,income)'
];
Meta:
LOAD META,
SubField(PurgeChar(META, '()'), ',') as METAVALUE
Resident Data;
Now when I select address in METAVALUE, I see this
Not sure, but why don't you try to create METAVALUE using SubField function
Data:
LOAD ID, META INLINE [
ID, META
1, '(main,person,address,career,income)'
2, '(main, profession,address,income,contribution)'
3, '(address,career,contribution)'
4, N/A
5, '(person,profession,career)'
6, '(address,profession,income,contribution)'
7, '(address,main,person,income)'
8, '(income,person,address,profession,career,contribution)'
9, '(main,person,address,profession,career,income,contribution)'
10, '(main,career)'
11, '(person,main,address)'
12, '(person,profession,career,income)'
13, '(main,profession)'
14, '(career,address,profession, income,contribution)'
15, '(main,person,address,profession,career,income,contribution)'
16, '(profession,person,address,contribution)'
17, '(career,address,income,contribution)'
18, '(main,career)'
19, '(main,address,profession,career,income,contribution)'
20, '(address,person,income)'
21, N/A
22, '(person,main,profession)'
23, '(career,main,person,profession,income,contribution)'
24, '(main,contribution)'
25, '(main,income)'
];
Meta:
LOAD META,
SubField(PurgeChar(META, '()'), ',') as METAVALUE
Resident Data;
Now when I select address in METAVALUE, I see this
I am not flly understand your case. But subField() helps
SubField(PurgeChar(FieldName, '()'), ',')
use subfield() to split the values.
And may be use And-Mode for showing the result where both value exists
More on And-Mode here:
And-Mode: How to enable AND and NOT selections with Green, White, Grey...and Red!