Newbies Spore Posted December 8, 2009 Newbies Posted December 8, 2009 Dear all, I am a relatively new user of Filemaker (from the social sciences!) and this question may sound extremely simple, but unfortunately I could not find a solution by my own yet. Here's the problem: I have a text field called "Text" with complete law texts. This means that these texts are relatively long (i.e. thousands of characters). I need to create a field with a dichotomous variable (Yes/No). I would like to get a "Yes" or a "No" in this dichotomous field in case a series of words ("President", "Governor") are present in my "Text" field. Until now I've been trying with the following calculation without luck: If ( Text = "President" or "Governor"; "Yes" ; "No" ) However, if I apply the same formula to another text field which comprehends a single word, this calculation works perfectly. Do you know if this kind of calculation functions work differently depending on the size (i.e. number of characters) of a text field? Do you think that I should use another function instead? Thank you in advance for your help!
comment Posted December 8, 2009 Posted December 8, 2009 Try: PatternCount ( Text ; "President" ) or PatternCount ( Text ; "Governor" ) This will return 1 if true, 0 if false - which is the best way to set up a Boolean (what you call "dichotomous") value.
TheTominator Posted December 8, 2009 Posted December 8, 2009 Try Case( PatternCount(Text; "President"); "Yes"; PatternCount(Text; "Governor"); "Yes"; "No" )
Newbies Spore Posted December 8, 2009 Author Newbies Posted December 8, 2009 It worked! thank you very much for your help!
Recommended Posts
This topic is 5522 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now