Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All -
I'm doing a project where I have to classify some data according to keywords found in several other fields. Below is an example of script I created in another application. I would like the words that lead off each line (Shopping, Flight, Transport......) to become a new field in my table so that it would be selectable from a list box. PRCH_HRCH_NM and MCC_DSCR are fields in my dataset which include my search words. My intention is to take this additional application out of service and have QV directly create this field.
Any help would be greatly appreciated.
Thanks!
George
'Shopping' IF FINDMULTI( PRCH_HRCH_NM, "Clothing" )
'Shopping' IF FINDMULTI( MCC_DSCR,"Pet shop","Motion","Building","jigsaw","Perfume","Propane","Fuel dealers","Drapery","Musical","Warehous","Drugs","Paint","Electrical parts","Photof" )
'Flight' IF FINDMULTI( MCC_DSCR"travel agen","Visa","ESTA" )
'Flight' IF FINDMULTI( PRCH_HRCH_NM, "Airlines" )
'Transport' IF FINDMULTI( PRCH_HRCH_NM, "Vehicle","Automobile","washes","Transp" )
'Transport' IF FINDMULTI( MCC_DSCR,"Automo","Taxi","Cabs","Bus lines","Washes","Transp")
'CCC Info' IF FINDMULTI( PRCH_HRCH_NM, "Invalid MCC" )
'Accomodation' IF FINDMULTI( PRCH_HRCH_NM, "Lodging" )
'Food/Drink' IF FINDMULTI( PRCH_HRCH_NM, "Eating","Food" )
'Health' IF FINDMULTI( PRCH_HRCH_NM, "Health service" )
'Health' IF FINDMULTI( MCC_DSCR,"dental","medical")
'Post/Gov' IF FINDMULTI( MCC_DSCR,"Postal","Courier","Freight")
'Org/Sch/College' IF FINDMULTI( MCC_DSCR,"Organi","School","College","Associa","Subscrip")
'Rec or Event' IF FINDMULTI( MCC_DSCR,"athltic","Golf","Amusement","Bands","Tourist","Caterers","Recreation","Bowling","Theatrical","Dolphin")
'Govt' IF FINDMULTI( PRCH_HRCH_NM, "Govern" )
'Miscellaneous' IF FINDMULTI( MCC_DSCR,"elsewhere")
'Cable/Tele' IF FINDMULTI( MCC_DSCR,"cable","Telecom","Phone")
'Cable/Tele' IF FINDMULTI( MCC_DSCR,"Book","Computer","Florist","Direct market")
'Miscellaneous' IF FINDMULTI( MCC_DSCR,"data prc","consulting","Information","Print","Advertis","Engineering","premiums","Preparation","Residential","Contractors")
'Miscellaneous'
Check out this
This is very close to what I need, but the question remains when I have multiple values I want to map to.
So for instance........if I use Shopping in the inline table........there are two fields PRCH_HRCH_NM and MCC_DSCR
where I'm looking for these values……………
'Clothing" Pet shop","Motion","Building","jigsaw","Perfume","Propane","Fuel dealers","Drapery","Musical","Warehous","Drugs","Paint","Electrical parts","Photof"
I want to classify all of those as ‘shopping’ and will include shopping in a list box so I can select it on my dashboard.
I don’t understand how to map the multiple values.
Would you be able to show 2-3 lines of what are you mapping from. And I guess this is your mapping table? Are you looking for values in MCC_DSCR and trying to map them to CC_Classifications?
That is a subset of my data table put together in ACL, in essence the completed table. the CC_Classification is the one word classification I want to include in a list box to group certain records............I'm searching for all those key words I list in PRCH_HRCH_NM and MCC_DSCR.