Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am having a field with values Seperated by pipeline.
For example
Sample | Value |
A|B|C | 1 |
A|B | 1 |
A|C | 2 |
B|C | 3 |
C|A|B | 1 |
A|D | 4 |
A | 1 |
C|B | 3 |
B | 4 |
D | 1 |
I need a multiselect dropdown with the distinct values from the column. In this case my dropdown should contain A, B, C and D.
If I select A from the dropdown then it should select the following rows
Sample | Value |
A|B|C | 1 |
A|B | 1 |
A|C | 1 |
C|A|B | 1 |
A|D | 4 |
A | 1 |
Now If I select both A and B from the dropdown Then it should select the following rows
Sample | Value |
A|B|C | 1 |
A|B | 1 |
C|A|B | 1 |
If I select A,B and C , Then I should get
Sample | Value |
A|B|C | 1 |
C|A|B | 1 |
Can somebody help me with this
to get the required filter do subfield on the sample
data:
Load *,
subfield(Sample,'|') as test
Inline [
Sample, Value
A|B|C, 1
A|B, 1
A|C, 2
B|C, 3
C|A|B, 1
A|D, 4
A ,1
C|B ,3
B ,4
D ,1
];
write the below expression in place of sample:
=if(getselectedcount(test)>0,if(WildMatch(Sample,'*$(=left(GetFieldSelections(test),1))*')and WildMatch(Sample,'*$(=mid(GetFieldSelections(test),4,1))*')
and WildMatch(Sample,'*$(=mid(GetFieldSelections(test),7))*')
,Sample),Sample)
thanks,
Priyanka
to get the required filter do subfield on the sample
data:
Load *,
subfield(Sample,'|') as test
Inline [
Sample, Value
A|B|C, 1
A|B, 1
A|C, 2
B|C, 3
C|A|B, 1
A|D, 4
A ,1
C|B ,3
B ,4
D ,1
];
write the below expression in place of sample:
=if(getselectedcount(test)>0,if(WildMatch(Sample,'*$(=left(GetFieldSelections(test),1))*')and WildMatch(Sample,'*$(=mid(GetFieldSelections(test),4,1))*')
and WildMatch(Sample,'*$(=mid(GetFieldSelections(test),7))*')
,Sample),Sample)
thanks,
Priyanka