3 Replies Latest reply on Aug 21, 2009 6:21 PM by ijontichy

    Position function in Calculation is affecting Font choice and size in layout.

    ijontichy

      Title

      Position function in Calculation is affecting Font choice and size in layout.

      Post

      FMP10 Advanced.

       

      I'm working on a database for Visual Effects work in film and this particular production has a numbering scheme that I have to parse.

       

       

       

      The name of a shot is V00001A.ABC.01 (as an example.)

      Information before the first . is a scene number.

      Information between the two .s is a location identifier.

      Information after the last . is the specific VFX shot number.

       

      No problem.     Here is the formula I'm using to cull the scene number.

       

      Left ( Full name ; ((Position ( Full name ; "." ; 1 ; 1 ))-1) )

       

      There might be more direct ways to do this (and I'm happy to hear them), but here's the problem.

       

      Any field I've created that includes the position function will no longer display in the font or size I want for my layout.  

       

      I've tried the work-around of doing a second field "get as text" calculation, but to no avail.

       

       

      Suggestions?

        • 1. Re: Position function in Calculation is affecting Font choice and size in layout.
          mrvodka
            

          A simpler calc may be:

           

          Substitute ( Full name; "."; " " )

           

          You can use LeftWords, MiddleWords, & RightWords to extract then one tha you want out.

           

          As for teh font changing, you can format the calculation field the way you want it or if the actual text has some kind of embedded formatting on when entered and you want the actual data to have the formatting as opposed to display, then you can use the text formatting functions such as TextStyleAdd(), etc.

          • 2. Re: Position function in Calculation is affecting Font choice and size in layout.
            philmodjunk
              

            Regardless of the functions used in the calculation, the field should display the font and size you specify when you place the field on the layout.

             

            As a test, I duplicated your fields in an FMP 10 database and was able to specify different fonts, sizes and style with no problem. (Select the field while in layout mode, choose your styles, and then save changes and return to browse mode.)

             

            If this is what you are trying and its not working, try doing this on a brand new layout, perhaps your layout has become corrupted in some fashion.

            • 3. Re: Position function in Calculation is affecting Font choice and size in layout.
              ijontichy
                

              Your suggestions were all very helpful.   Turns out the imported data had some formatting applied to it.   Not quite sure how that happened, but the TextFormatRemove function gave me back my functionality.

               

              And the substitute command was certainly an easier way of parsing the file name.    A very nice bit, that.

               

              Still hoping for an answer regarding my server issues, but hooray for this forum.