1 2 Previous Next 23 Replies Latest reply on Apr 28, 2010 7:49 PM by PeteC

    Thumbnail selection

    PeteC

      Title

      Thumbnail selection

      Post

      Hi,

      I'm putting together a product database with the usual fields like part# description etc plus a main image.

      Under the main image I want to have thumbnail images (about 6) that would show variations of the product, the user clicks on a button (each thumbnail would have it's own button) and only that selection would appear in a separate layout (quotation layout) is this possible?

      Would appreciate help from the experts.

      I'm running Win 7 Pro, Filemaker 10 Advanced.

       

      Thanks in advance

      Pete

        • 1. Re: Thumbnail selection
          jerrysalem

          Yes this is possible.  I have done it.

          I would suggest putting the images in a separate FILE.

          This way as the image database grows it can be backed up separately.

           

          Show the separate images in a portal on the main product page, this way you have flexibility to have more than 6 images.

           

           

          Jerry

          • 2. Re: Thumbnail selection
            PeteC

            Thanks for the reply Jerry,

             

            As I'm new to FM and containers (I'm making progress with FM!) would it be possible to step me thru this please.

            Many thanks.

            Pete

            • 3. Re: Thumbnail selection
              philmodjunk

              Are portals a new concept?

               

              One of your first steps will be to define a related "image" table that you can place in a portal so you can display your thumbnails. Check out portals in filemaker help and post back here with questions on that if you can't figure that out.

               

              If you can create portals, let us know and we'll advance to the next step in the process.

              • 4. Re: Thumbnail selection
                PeteC

                Hi Phil,

                Sorry, when I said containers I ment to say portals!

                I think I'm OK with insering a portal but the rest I am a bit shaky.

                Thank you.

                 

                Pete

                • 5. Re: Thumbnail selection
                  philmodjunk

                  Well, you need containers in your portal--so you need to understand both concepts.

                   

                  First you need a field that serves as a primary key, that may or may not be your part number.

                   

                  Primary keys must uniquely identify each record in your table. Ideally, they are auto-generated by the database to avoid problems that can occur if a person has to type in a primary key. If your part numbers are auto-generated serial numbers, use that field. If not, define an auto-generated serial number which I'll call ID. If this is a database where you already have data entered, use replace field contents to put serial numbers into the ID field for your existing records.

                   

                  Define a new table, Images, with at least two fields:

                  ID (number)

                  Image (Container)

                   

                  (You can add as many fields as you need here to document any information you need to store that is specific to that image.)

                   

                  Link your parts table to Images:

                  Parts::ID = Images::ID  (enable allow creation of records for Images)

                   

                  Place a portal to Images on your parts layout.

                  Place the Image field in the portal row.

                   

                  You can add images by clicking in the image field and choosing insert picture to insert a picture into the image field. You'll see an option for inserting the picture by reference if you wish to use it. If this is a database that is hosted over the network, images stored by reference have to be located in a shared directory that is mounted in identical fashion on each user's machine.

                   

                  See if you can get that to work and we can tackle the rest of your request.

                  • 6. Re: Thumbnail selection
                    PeteC

                    Thanks very much Phil, I'll get to work on that right away.

                     

                    Regards

                    Pete

                    • 7. Re: Thumbnail selection
                      PeteC

                      Hi Phil,

                       

                      Managed to set that up with no problems (I think) ready for the next stage, thank you.

                      Regards

                      Pete

                      • 8. Re: Thumbnail selection
                        philmodjunk

                        Hmm, I've re-read you original post.

                         

                        Can you describe in more detail what you want to see on your quotation layout after the image is clicked? I can read that part of your post more than one way and I think you're going to need one more field, a serial number field, in your image table.

                        • 9. Re: Thumbnail selection
                          PeteC

                          Hi Phil,

                           

                          My client sells promotional giftware such as polo shirts, caps, sporting clothing.

                          On the first layout, which I've named "Product Catalog" there would be the usual fields like part #, description etc plus a large image about 200px x 200px.

                          There are fields with the cost price and sell price, some how or other I've got all that part to work just fine.

                          In addition to large image I want to have several thumbnails showing the variations of that product like colour and style ( I would require 4 Thumbnails) so when my client is working out a quote they can select the thumbnail or thumbnails and only those selected thumbnails would appear in the "Quotation Layout" and not the thumbnails that were not selected. I hope that makes sense!!

                          Thanks very much.

                           

                          Regards

                          Pete

                          • 10. Re: Thumbnail selection
                            philmodjunk

                            As I suspected, we need that serial number Id field.

                             

                            If you already have these image records entered we'll have to update the field to enter serial numbers for the existing records.

                             

                            Add a field definition to Images, ImageID and set it up as an auto-entered serial number. (Click options and find the settings for this on the auto-enter tab.)

                            For existing records, you'll have to place this field on a layout, show all records, put the cursor in the field and use Replace Field Contents to put a serial number in them.

                             

                            In your original table, Define a new text field, ImageList.

                             

                            Now you need a second table occurrence to use for displaying your selected images.

                            Go to Manage | Database | Relationships and click the Images table occurrence box.

                            Now click the button with two green plus signs to make a second table occurrence. You haven't created a new table, just a new label for the existing one so you can define a different relationship.

                             

                            Drag from ImageList in your original table to Images 2::ImageID to define this new relationship.

                             

                            Write a script to add/remove ID codes from ImageList.

                            If [ IsEmpty ( FilterValues ( YourTable::ImageList ; Images::ImageID ) ) /* image is not selected */]

                               Set Field [ YourTable::ImageList ; YourTable::ImageList & ¶ & Images::ImageID & ¶ ]

                            Else

                               Set Field [YourTable::ImageList ; Substitute ( YourTable::ImageList ; ¶ & Images::ImageID & ¶ ; "" ) ]

                            End If

                             

                            Now you can put a button in your Images portal row to run the above script to select/deselect an image.

                            A portal to Images 2, will show your selected images.

                            • 11. Re: Thumbnail selection
                              PeteC

                              Sorry Phil, I must be a bit dumb but I can't get this to work! I think I'm getting confused about which fields go into which layout i.e. Product Catalog, Quotation or Images. I'm close but not quite there.

                              Your words of wisdom please.

                               

                              Thanks in advance

                              Pete

                              • 12. Re: Thumbnail selection
                                philmodjunk

                                At which point did the train derail on you?

                                 

                                Where you able to add a serial number field to your table?

                                 

                                Where you able to set up the relationship with the new table occurrence?

                                • 13. Re: Thumbnail selection
                                  PeteC

                                  Thanks for the reply Phil,

                                   

                                  Don't know quite where I've gone wrong?

                                  I had followed your instructions to the letter (I thought) but can't get the selected thumbnail images to appear in the quotation layout.

                                  The relationship between the Product layout, ImageList and Images2, ImageID seems to be OK

                                  Everything else is appearing as it should in the quotation layout.

                                  Sorry to bother you with all this but once I've done one I'll be set.

                                  Thank you.

                                  Regards

                                  Pete

                                  Product layout

                                   

                                  • 14. Re: Thumbnail selection
                                    philmodjunk

                                    I can't see your posted image, I just get an empty box.

                                     

                                    Here's a demo file: http://www.4shared.com/file/-Lmn1zNz/ImageSelector.html

                                    That uses what I've described. Compare it to your file and see if you can spot the difference. I've simplified the demo--using a cartesian join (X) operator so that the first portal simply displays all image records, but other than that, it's the same as what I've posted here.

                                    1 2 Previous Next