4 Replies Latest reply on Mar 13, 2012 10:38 AM by lbellino

    Letter Character Change

    lbellino

      Title

      Letter Character Change

      Post

      Is there a way in FMP where I can change the character format from lower case to upper case or vice versa? For example: Instead of reading "southwest", I want it to read "SOUTHWEST".

      I know I could do a replace field contents, but I have many that I would need to do, that's why I was wondering if there was a way to do for all within one field.

      Thanks.

        • 1. Re: Letter Character Change
          philmodjunk

          Can you describe what you need in more detail?

          Is "southwest" text in a field that might read: "The bird flew in from the southwest" or is it the entire contents of the field?

          Do you want a permanent change made to the data stored in the field or do you just need a temporary change made for display purposes?

          When you say "I have many that I need to do" do you mean many different words in which to change case or are there many fields on which you want to work the same change for the same specified text?

          • 2. Re: Letter Character Change
            lbellino

            SOUTHWEST is the only text in the field, but I have others like Mid-Atlantic. All one words in the field and the change would be permanent, unless I get direction otherwise to change it back, but probably won't.

            All in all, I will have 7 words in this particular field to change from lower case to upper case. But I do have another field that I would like to do the same thing to, which have more than one word in the field, such as: 

            Paducah-Cape Girardeau-Harrisburg KY

             but I want all words to be upper case, as well.

             

            • 3. Re: Letter Character Change
              philmodjunk

              The key distinction is not whether there is one word in the field but whether you want to change all the text in the field or not and whether you want to change the text in all records or only some records.

              Replace field Contents with the calculation option:

              Upper ( YourTable::TextField )

              will replace the contents of the field with the upper case equivalent for every record in your found set for the specified field. You can perform a find to limit the found set to just those records you want to update. You can also use a selective calculation so that you can perform this against all records in your found set, but only those records with specified values are modified:

              Case ( YourTable::TextField = "mid-atlantic" ; Upper ( YourTable::textField ) ;
                          YourTable::textfield = "southwest" ; Upper ( YourTable::textfield ) ;
                          YourTable::textfield )

              This will modify only those fields that equal "mid-atlantic" or "southwest", leaving all other records in the found set unmodified.

              • 4. Re: Letter Character Change
                lbellino

                That worked for what I was looking for. Thanks!