10 Replies Latest reply on Mar 12, 2015 2:57 PM by philmodjunk

    Can fields contain images?

    PamelaSnyder

      Title

      Can fields contain images?

      Post

      Is it possible to put an image (like a jpg) in a field?

       I am trying to track chemical safety data.  One of the required items is (are) a pictogram(s) - there are only 9 of them.  

      I was hoping to create a table with the pictograms - and then as new chemicals are received I could use a look up to import the correct pictogram(s) for each chemical.

      If putting an image in a field is not possible - what is the best way to pull the image up by an associated term?

      I'm not a programmer/developer  - so please use small words :)  

      Thank you!

      Pam

        • 1. Re: Can fields contain images?
          schamblee

          You can insert an image into a container field.

          • 2. Re: Can fields contain images?
            PamelaSnyder

            Thanks for the info!

            I have tried copying and pasting from Paint and Picassa and nothing happens.  Is there a secret?

            • 3. Re: Can fields contain images?
              schamblee

              It can not be a text field, it has to be a container field.

              • 4. Re: Can fields contain images?
                PamelaSnyder

                awesome!  It makes me cringe when the answers are so simple - but it makes me happy as well.  Thank you!

                • 5. Re: Can fields contain images?
                  GuyStevens

                  Hi Pamela, I liked your question and decided to make a quick little video to show how this could be done.
                  I wouldn't suggest using a lookup to continually copy the image because your database would become very large in size. 

                  But you can make a simple related table with a few images and link to that.

                  Check out my video here.
                  And my Test File.

                  My Youtube Channel
                  My Udemy Courses

                  • 6. Re: Can fields contain images?
                    PamelaSnyder

                    Guy Stevens - this is great!  I have set it up and it works - but (there is always a but)  how does this work with repeating fields?

                    I only have 9 "pictograms" that I need to associate with the chemicals (it is a global system).  But there are some chemicals that have multiple pictograms associated with their safe use (e.g. chloroform has 3) There are also chemicals that have none.

                     I was going to use multiple fields and do lookups, but your way is very slick and I would like to use it, but how do I accommodate needing multiple images with your system?  I tried having a replicate field and it broke the system.  (I don't understand the tool that you used to pull up the image - so I am not sure how to troubleshoot.  Would a repeating field work here?  Is there a way to make the image pull up a repeating field too?  Thank you for your time.

                    • 7. Re: Can fields contain images?
                      philmodjunk

                      You might use a set of related records instead of a repeating field. This leaves you able to list a fully flexible number of pictograms with each and every chemical.

                      • 8. Re: Can fields contain images?
                        PamelaSnyder

                        I have never used "go to related records" and am not sure how to apply it.

                        I currently have the pictograms set up in a different table - only nine records - each with an id, a label (word), and an image, so only 3 fields.  Originally I had planned to have either multiple fields or a repeating field and do a look up for the image.  Guy Stevens suggested a different way as his way would keep the file size smaller.  His way works great, but I an not sure how to get multiple pictograms with it as the field that I pull in seems to be able to associate only with one label field (I tried creating a second label field and pulling in the image depending on what was entered into the label2 field - but it didn't work.

                        This is part of a chemical inventory for a molecular laboratory - we probably will never have more than 200 chemicals at any one time.  Many of the chemicals will have no associated image - so maybe a huge file is not a worry?  

                        I hope to be pulling info from this chemical table into other tables such as reagent prep and cost analysis - the database could eventually have many tables - but the current table will not be very big.  (don't know if that makes things clear or not)

                        • 9. Re: Can fields contain images?
                          GuyStevens

                          Hi Pamela,
                          I don't know exactly how PhilModJunk's system would work. 
                          But he's a filemaker Genius so he knows what he's talking about. 
                          I would probably use a pretty simple system. Like for instance a portal.
                          I made a follow up video here: Youtube
                          And the example file can be found here: File

                          Greetings
                          Guy Stevens

                           

                          • 10. Re: Can fields contain images?
                            philmodjunk

                            Consider these tables:

                            Chemicals----<Chemical_Pict>------Pictograms

                            Chemicals::__pkChemicalID = Chemical_Pict::_fkChemicalID
                            Pictograms::__pkPictID = Chemical_Pict::_fkPictID

                            You already have your table of chemicals and your table of pictograms. The new table, Chemical_Pict, serves as a "join" table linking the two such that any chemical can be linked to any number of pictgrams and any pictogram can be linked to any number of chemicals. A portal to Chemical_Pict can be set up on a Chemicals layout in order to select Pictograms for it in the portal. The container field from Pictograms can be included in the portal row and will show the correct icon once you have selected the correct value in _fkPcitID--which can be done using a value list of PIctID's and associated names.

                            And you can still list the pictograms horizontally, using what's called the "horizontal portal" technique though you lose some of the flexibility of a standard vertical portal when you do so.