picnichouse Posted April 13, 2004 Posted April 13, 2004 Hi, I'm trying to do a calculation like this: If the first letter of a text field = "A", this field equals X. If the first letter of a text field = B, this field equals Y. And so on. How do I tell filemaker to look for the value of a particular digit? Thanks! Andrew FileMaker Version: 7 Platform: Mac OS X Panther
Damocles Posted April 13, 2004 Posted April 13, 2004 Here's the quick and inelegant answer to your first question. TextField=Text OtherField= Calculation Case( Left(TextField,1)="A","X", Left(TextField,1)="B","Y", "Whatever the field will equal if none of the conditions are met") As for the second question: How do I tell filemaker to look for the value of a particular digit? Check the forum for the Middle, Left, and Right functions. They will pick whichever letter you designate and return that value. I'd suggest the "Quick Parsing Tutorial" by Ugo Di Luca. It will likely answer some of your questions in better detail. Paul
picnichouse Posted April 13, 2004 Author Posted April 13, 2004 Thanks very much Paul, exactly what I was looking for!
-Queue- Posted April 13, 2004 Posted April 13, 2004 A more efficient solution, if you're wanting to use the entire alphabet, would be to use Middle( "XYZABCDEFGHIJKLMNOPQRSTUVW", Position( "ABCDEFGHIJKLMNOPQRSTUVWXYZ", gLetter, 0, 1 ), 1 )
Recommended Posts
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