Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

Create keywords(*BUSINESS*) from column data.

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

1 Solution

Accepted Solutions
MarcoWedel

If ( business_desc like '*Food*' , 'About Food' , Null() ) as Keywords


see also: String operators


hope this helps


regards


Marco

View solution in original post

11 Replies
MarcoWedel

If ( business_desc like '*Food*' , 'About Food' , Null() ) as Keywords


see also: String operators


hope this helps


regards


Marco

jim_chan
Specialist
Specialist
Author

you are right!

MarcoWedel

Hi,

if you have a table of keywords, then another solution might be:

Subfield Function

hope this helps

regards

Marco

jim_chan
Specialist
Specialist
Author

Hi Marco,

I realised there's  a description like - Chili Chicken  and another one is Chili Paste Chicken.

I need to create a keyword that it can find both of this description. Can i write:

if ( business_desc like '*Chili* + '*Chicken*' , 'Spicy Chicken' , Null() ) as Keywords

MarcoWedel

Hi,

you could try

if ( business_desc like '*Chili*Chicken*' , 'Spicy Chicken' ) as Keywords


regards


Marco

jim_chan
Specialist
Specialist
Author

how mnay keywords can i add in??? can i add more than 2 keywords, if yes, how should it looks like?

jim_chan
Specialist
Specialist
Author

Hi guys,

i have a situation as such, and i tried to add it in the loading script, is it possible?

(*Personnel*|*retain*) ?

Rgds

Jim

MarcoWedel

can you please post some different examples of your source strings and keyword combinations as well as your expected result to create a sample application with?

thanks

regards

Marco

jim_chan
Specialist
Specialist
Author

Hi Marco,

here's the screenshot. i have also attached sample data.

screenshot.jpg

Here's my script :

final_survey:

load

*,

    If ( survey_desc like '*lamb*' , 'lamb' ,

    If( survey_desc like '*chili**CHICKEN*' , 'chili chicken' ,

    If( survey_desc like '*chicken**beef**lamb*' , 'chicken and beef and lamb' ,

  

      Null() ))) as keywords

    

      Resident survey;

    

      drop table survey;

now this one is not functioning -   If( survey_desc like '*chicken**beef**lamb*' , 'chicken and beef and lamb'.

i want to have when user choose chicken and beef and lamb from the listbox, then it should show me desriptions  that has chicken,beef and lam words.

rgds

jim