1 Reply Latest reply on Oct 19, 2011 8:57 AM by philmodjunk

    need to add photo using a calculation

    AndyNotton

      Title

      need to add photo using a calculation

      Post

       hi all

      i have a problem i use font to display a products type which work well but i am now using a ipad and filemaker go but i cannot add fonts

      so i was going to use photos here what i use now

      If ( Towbar type="Flange Towball (ZC1260A)-Required"; "a" ; If (Towbar type= "Semi-automatic Horizontal Detachable Neck" ; "d"  ; If ( Towbar type= "Swan Neck - Fixed" ; "b" ; If ( Towbar type = "Flange Towball (ZC1260A) or Coupling (ZC1405/1156/1157)-Required" ; "g" ; If ( Towbar type = "Fully-automatic Vertical Detachable Neck" ; "f" ; If ( Towbar type= "Fully-automatic Horizontal Detachable Neck" ; "e" ; If  (Towbar type= "Flange Towbar- Included" ; "a" ; If  (Towbar type= "Flange.eps" ; "a"  ; If ( Towbar type= "Qvert.eps" ; "f" ; If ( Towbar type= "stowbar.eps" ; "d" ; If (Towbar type= "Qhoriz.eps" ;"e" ;" " )))))))))))

       

      and need to change to show a photo or is there a different way round it

       

      andy

      filemaker pro 11 window 7

      filemaker go ipad 2

       

       

       

        • 1. Re: need to add photo using a calculation
          philmodjunk

          I wasn't aware that iPads had that limitation, but then I don't own an iPad. I'm basing some info on this post on what I've learned from "lurking" on the FM GO forum.

          First, use a case statement in place of these nested If functions for easier readability!

          Case ( Towbar type="Flange Towball (ZC1260A)-Required"; "a" ;
                    Towbar type= "Semi-automatic Horizontal Detachable Neck" ; "d"  ;
                    Towbar type= "Swan Neck - Fixed" ; "b" ;
                    Towbar type = "Flange Towball (ZC1260A) or Coupling (ZC1405/1156/1157)-Required" ; "g" ;
                    Towbar type = "Fully-automatic Vertical Detachable Neck" ; "f" ;
                    Towbar type= "Fully-automatic Horizontal Detachable Neck" ; "e" ;
                    Towbar type= "Flange Towbar- Included" ; "a" ;
                    Towbar type= "Flange.eps" ; "a"  ;
                    Towbar type= "Qvert.eps" ; "f" ;
                    Towbar type= "stowbar.eps" ; "d" ;
                    Towbar type= "Qhoriz.eps" ;"e" ;
                    " " )

          There are several approaches you can try. Since you want to do this on an Ipad, the speed with which your screen refreshes can be a major issue so you may want to test each of the following approaches to see what works best;

          1) You can set up a table of related records with one image in a container field in each record and a text field with "a", "d", etc entered to match with the results of this calculation. Then define the relationship to match the above field in your current table to this text field in the new table. now you can add the container field from this related table to your layout and the above calculation will control which image is displayed.

          2) Define a repeating container field and load the images in different repetitions of this field. Modify the above calculation to return the number of the repetition storing the matching image. a calculation with "container" specified as its return type can use getRepetition with the above calculation field specifying the repetition to return the desired image. Place this calculation field on your layout to display the image.

          3) Keep looking for a text only solution as this will be a much faster option than graphics.

          Edit the graphics to give them only as much resolution as needed for a clear display on the iPad screen and only display the smallest number of records with these images (best only one) to minimize the "load" on your iPad's processor.