Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
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,
...
;