another novice question- search in 1 field and enter in another
I am a novice with FMP still and I am trying to learn as I build my first database.
I have data that was downloaded and that I now need to organize so that I can get outputs I understand. I am trying to extract data (text, one of various words) from a particular field and if one of these words is present I want to have a text entry (a single word) put into a different field.
I am looking at who is sponsoring something, and the institutions are listed by name. I want to categorize them by Academic, Industry... and based on key words in the first field I want either "Academic" or "Industry" entered into a different flied. Is the best way to do this with a calculation in the filed I want to populate into or would a script be better?
I have tried writing my own calculation and I can get the program to find something (obviously not the right thing yet) and then try to write in the new field but I am not getting the separation between "Academic" and "Industry".
What I have tried so far is:
GetField ( Sponsors ) = "*University*" ; "Academic" ;
GetField ( Sponsors ) = "*Hospital*" ; "Academic" ;
GetField ( Sponsors ) = "*College*" ; "Academic" ;
GetField ( Sponsors ) = "*School*" ; "Academic" ;
GetField ( Sponsors ) = "*Inc.*" ; "Industry" ;
GetField ( Sponsors ) = "*Ltd.*" ; "Industry" ;
And this was just a pilot to see if I was on the right track... I wasn't:
If ( GetAsText ( GetField ( Sponsors ) ) = "*University*" ; "Academic" ; "Industry" )
Thanks for your help!