Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a scenario in my application. I have name of person and profession. I have few persons with multiple professions.
For example i have ram( teacher, cricketer) , james(politician,bishop), roni(it, cricketer).
I want to create a filter for profession with options cricketer and non cricketer. I am using if condition at the backend as if (profession =' cricket' , cricket ,non cricket) as profession1.
Now while i am selecting filter as cricketer it is not working for ram, roni etc. for non cricketer it is working
How can i handle this situation in a dynmic way.
Try to see if GENERIC LOAD could suit you.
GENERIC is a prefix that will split a single table into several ones, in a dynamic way.
Fabrice
generic load is useful in such situation
Hi Vitul,
You can solve this by using SubStringCount() and IF statement. Here is the sample code and attached QVW.
LOAD * INLINE [
Name, Profession
Ram, Cricketer
Ram, Teacher
James, Politician
James, Bishop
Roni, IT
Roni, Cricketer
];
NoConcatenate
Final:
LOAD *,
IF(SubStringCount(Name & Profession, 'Cricketer') > 0, 'Cricketer', 'Non-Cricketer') AS Is_Cricketer
Resident Temp;
Drop table Temp;
Cheers,
DV
what about a led check boxes listbox with this expression?
=if(wildmatch(aggr(concat(Profession, ', '), Name), '*Cricke*') , 'YES CRICKETER', 'NO CRICKETER')
I used Deepak (thanks) data