April 13, 200421 yr 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
April 13, 200421 yr 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
April 13, 200421 yr 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 )
Create an account or sign in to comment