Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
i wanted to create a keyword field from 1 of my existing field. The existing field is business_description where it contains long desvcription.
So i want to create a keywords list box, pick up some words from each of the description .
at the loading script, i've wrote.
If ( business_desc = '*Food*' , 'About Food' , Null() ) as Keywords.
When I loaded the script, i have found that the keywords list box is empty! no data!
So, my script is wrong?
Rgds,
Jim
Hello , marco?
Hi,
depending on your requirements one solution could be:
final_survey:
LOAD *,
If(survey_desc like '*chiken*beef*lamb*', 'chicken and beef and lamb',
If(survey_desc like '*chili*CHICKEN*', 'chili chicken' ,
If(survey_desc like '*lamb*', 'lamb',Null() ))) as keywords
Resident survey;
DROP Table survey;
So just change the order of your nested if() functions according to the priority you wish.
'*lamb*' in this case only becomes relevant if the string is NOT like '*chiken*beef*lamb*' (note the chicken typo in your example).
hope this helps
regards
Marco