Discussion Board for collaboration on QlikView Scripting.
So, i have this table that I need to compare column "Food_name", and "Replacement for"
What I need:
everytime I pick one item from the field "Replacement for", it returns to me the item_id from the Food_name related to, and i want that to be stored as a field... For example:
If I pick any of the items that is a replacement for hamburguer, it should return to me the id = 1... So, If I choose fish, which is a replacement for hamburguer, it returns me the item_id 1...
The table is this one:
The final table I would like to have it's this one, with that "item_id_Replacement" added created by qlikview :
Go to Solution.
Please check enclosed file.
Hope this helps...
I think you can use Applymap() function.
First, load a table with two fields (Food_Name, id): first field is the key, second field is the one that will be the replacement
And afterwars, use Applymap():
Applymap('MapFood', Replacement_for) as newid,
MapFood is a temp table. No need to drop it at the end of the script.
thank you both... just to finish my questions... When I get the field in the dropbox, i get also the blanks fields also... How do I take that off???
Didn't understand your problem.
Can you elaborate?
in the qlikview, I go "select fields", then I choose the field "Replacement for", the blank fields are coming, i want that not to come with... where do I take that off?
Right below expression in List Box Expression instead of selecting [Replacement for] directly...
=IF(Len([Replacement for])>0,[Replacement for])
thank you alot, that's exactly what i wanted (: