2 Replies Latest reply on Jan 20, 2013 5:09 AM by JohnTurner

    Drop Down list in portal to insert picture in container field on same layout

    JohnTurner

      Title

      Drop Down list in portal to insert picture in container field on same layout

      Post

             
      1.           I am looking to have a drop down list in a portal with a name for each picture i.e. pic 1 etc. I would then like to attach a picture to each name so that when I access each picture i.e pic 1, pic 2 etc the appropriate picture can be viewed in the container field. Both portal with drop down list and container are on same layout. I understand that what I am trying to do can be done through a script and/or through a relationship. I have tried both but can't raise the connected picture.
                  .

        • 1. Re: Drop Down list in portal to insert picture in container field on same layout
          philmodjunk

               A portal indicates that you have a relationship between two table occurrences located in Manage | Database | Relationships.

               What is that relationship?

               I would guess that you have something like this, but with different names. I'm naming things by where they are found in your solution:

               LayoutTO------<PortalTO

               LayoutTO::__pkLayoutTOID = PortalTO::_fkLayoutTOID

               Let's add one more table to this like this:

               LayoutTO------<PortalTO>--------PicturesTO

               PortalTO::_fkPicturesTOID = PicturesTO::__pkPicturesTOID

               Put your container field in Pictures, not one of the other two tables. Define a PictureName field and enter the name of the picture, use the Unique Values validation field option to ensure that each picture has a unique name.

               See the first post of this thread if this notation is not familiar: Common Forum Relationship and Field Notations Explained

               You can then place _fkPictureTOID in the portal row formatted as a drop down list or pop up menu. Give it a value list with __pkPicturesTOID as the first field and PictureName as the second field. This allows your user to select a picture by name. Put the container field from PicturesTO in your portal row and when you select a picture name in the drop down, the selected picture will appear in this field.

          • 2. Re: Drop Down list in portal to insert picture in container field on same layout
            JohnTurner

                 Thank you for your help with my question. I am now able to view pictures in the container field. Your reference to notation was also extremely helpful because by using it throughout my database I have not only simplified some table fields but also found errors that were creating problems.