2 Replies Latest reply on Apr 23, 2015 9:54 AM by MartinBishop

    Item Report Default Picture



      Item Report Default Picture



      I have a catalog of items with 3 container fields for pictures, not all of the items have all three pictures. I would like to be able to set up a calculation, or script (I guess) so that when an item report is viewed and one of the pictures is missing a default image shows on the report layout (sort of a "image missing" or "image not available") instead of a blank space. I do not want it to actually populate the fields on the table with this image just show it on an item report. I am guessing something along the lines of: if container is empty, use image "x", but I have not idea what I am doing.

      FMP Advanced 11.0 v2

      User Level: novice, just got it last month.

      Windows 7

        • 1. Re: Item Report Default Picture

          One very simple approach you might use:

          1. Make sure that your container field is set to use a transparent fill pattern. (That is often the default, but make sure.)
          2. Place layout text such as "Image Missing" behind the container field. (The position tab of the inspector can be used to change which layout object is in front and which is in back.)
          3. When there is no image in the container, the user will see the text.

          A more sophisticated approach you can use if you want to display an actual image when the container field is empty would work like this:

          1. Define a global container field and insert your "image missing" image into it.
            Define this calculation field:
          2. If (IsEmpty ( ContainerField ) ; MissingImageContainerField ; ContainerField )
          3. Select "Container" as the calculation's return type and place this field on your report layout in place of the original container field.
          • 2. Re: Item Report Default Picture


            Can you elaborate on the calculation if you want to fill the image container based on multiple categories? For example Instead of 1 default image, having multiple fields containing the category image and filling the default image.

            If is empty + category=shirts ; missing ; containtshirts


            If is empty + category=pants ; missing ; containtpants