3 Replies Latest reply on Jul 31, 2017 5:20 AM by ErikWegweiser

    VerifyContainer function question

    GraemeM

      Title

      VerifyContainer function question

      Post

           Below is calculation field's calculation which I am trying to have it show whether there is an image in the container field "RDS_Diagram". At the moment the calculation is returning an X for all the records yet I can see a number of records do not have an external jpeg referenced to it.

           If (VerifyContainer ( RDS_Room_Diagram ) = "?" ;  "" ;  "X" )

           Is there a simpler way to do what I want and or am I missing something about the VerifyContainer function?

            

           tia

        • 1. Re: VerifyContainer function question
          philmodjunk

               VerifyContainer only works with externally stored containers. From the info in FileMaker Help, it would appear that a result of 0 would indicate an empty externally stored container field. But simply changing the file will also produce a 0 result so this doesn't look like a function that you can use to check for an empty container field. A ? result indicates an error due to referring to a field that is not a container field.

               I'd use:

               If ( Not IsEmpty ( RDS_Room_Diagram ) ; "X" )

               Which will work with all storage options you might select for a container field.

          • 2. Re: VerifyContainer function question
            GraemeM

                 Lovely that worked

                 Thank you very much

            • 3. Re: VerifyContainer function question
              ErikWegweiser

              I had a strange situation today. A couple externally stored image container records were showing "<missing: filename.jpg>" instead of the thumbnail.  The VerifyContainer function was showing boolean True for these and all other container records. For the missing ones, I expected VerifyContainer to be False.

               

              I fixed the problem by exporting or dragging the image out of the container and then back in and all was well.

              Viewing the actual RC content, I see the missing file (since deleted) and its replacement.

              Odd. Perhaps "valid" in that the file existed, but the thumbnail was somehow lost?