Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sxbbb
Creator III
Creator III

want to make a Listbox 'Type' where in the Listbox there are two values: ONETYPE and TWOTYPE

I have a Field 'PartNumber'. I have separated 'PartNumber'' into 2 types. by Use code.

TEST: 

load  PartNumber,

if(WildMatch(if(IsNum(left(PartNumber',1)),mid(PartNumber',7,1)) ,'M','D'),PartNumber') as ONETYPE,

if(WildMatch(if(IsNum(left(PartNumber',1)),mid(PartNumber',7,1)) ,'A','B'),PartNumber') as TWOTYPE

where XXX;

But 

I want to make a Listbox 'Type' where in the Listbox there are two values: ONETYPE and TWOTYPE

to select a category type.

 

1 Reply
henrikalmen
Specialist
Specialist

Listboxes show values from one (1) field at a time, but here you are creating two fields. Try something like this:

TEST:
load *, if(len(ONETYPE)>0, 'ONETYPE', if(len(TWOTYPE)>0, 'TWOTYPE', 'unknown')) as Category
;
load PartNumber,
if(WildMatch(if(IsNum(left(PartNumber',1)),mid(PartNumber',7,1)) ,'M','D'),PartNumber) as ONETYPE,
if(WildMatch(if(IsNum(left(PartNumber',1)),mid(PartNumber',7,1)) ,'A','B'),PartNumber) as TWOTYPE,
...
;