Discussion Board for collaboration on QlikView Scripting.
I have a simple list box and added one field from a SQL database. On display, the box shows 3 rows ;
I would like to display BIRD instead of 1, CAT instead of 3 and DOG instead of 20 . Maybe I can use an expression ? Like match('1' , Fieldname, 'BIRD') or something ?
Go to Solution.
Create Inline table
Write in script
* INLINE [ num, Value 1, Bird 3, Cat 20, Dog];
Then use Value as List box
Or you can handle it on front end
create list box with expression
Try this in script
Pick(Match(num, 1, 2, 20), 'Bird', 'Cat', 'Dog') AS NewField
INLINE [ num 1 3 20];
Hope this helps you.
This was what I needed and it works :
Many thanks @max dreamer
Why using 3 ifs and 3 WildMatch(), simply use one WildMatch() and one Pick(), what if you have 50 number? will you include 50 If() and 50 WildMatch()?
=Pick(WildMatch(num, 1, 3, 20), 'Bird', 'Cat', 'Dog')
this is much easier , thanks jagan mohan