1 2 3 4 Previous Next 45 Replies Latest reply on Feb 24, 2012 1:35 AM by Fagreement

    Layout Refresh issue

    Fagreement

      Title

      Layout Refresh issue

      Post

      Hello,

      I have a layout where i am displaying a list of images in a portal. see attach file

      When the user clik on the image, I am displaying it in a bigger container. using a script

       

      the portal is mapped to table Photo

      the big container s maped to table Photo:PhotoContainerInFM

       

      My issue is in the end of the script i am forced to use Refresh windows, otherwize the displying of the image in the big container doesn't work. and the pbm is when i have a lot of images it's not fun, the layout takes a moment to refresh himself!

       

      PhotoGalleryPortal.png

        • 1. Re: Layout Refresh issue
          philmodjunk

          Did you try this without the "flush" option specified? It's the most likely part of the delay from your refresh window.

          Copy and paste is not the best option here. Not only is there no need to copy the entire container contents just to display it, set field can be used instead of copy/paste this keeps your system clipboard unchanged as Copy will overwrite your current clip board contents--which can confuse and irritate your users when data they have previously copied disappears.

          You can set up a relationship (self join works) such that you simply set a global variable to the selected image's photoID and then a field to this related table occurrences container field displays the image. This should work with nothing more than possibly a commit record step.

          • 2. Re: Layout Refresh issue
            Fagreement

            without flush doesn't work.

             

            sorry i didn't get your point how can i do it.

            without copy/paste, as it is, it doesn't work.

            self join works? self join on the same table?

            • 3. Re: Layout Refresh issue
              philmodjunk

              I've been looking at your script and screen shot and seems like something is missing. You say you have a portal, but don't describe it. What method have you used to display the columns of container photos? Do you have 5 portals placed side by side to get 5 columns of images? What's missing is that your script only refers to Photo, yet with a portal, you must have two table occurrences involved--one listed in Show Records From in Layout Setup and one listed in Show Related Records From in Portal setup. Photo is listed for which? the Layout or the portal? And what is the other table occurrence?

              • 4. Re: Layout Refresh issue
                Fagreement

                yes 5 portals

                 

                 

                in portal setup i have the field: Photo::PhotoContainerInFM

                in my layout i mapped the table: FakeDisplayPortalPhoto

                 

                And what is the other table occurrence?

                whcih table?

                • 5. Re: Layout Refresh issue
                  philmodjunk

                  In layout mode, note the text in the bottom left corner of the portal or double click it to open portal setup to see the "Show Related Records From" drop down where you'll see the same table occurrence name.

                  From your script, I can now deduce that the portal is based on Photo (If not let me know).

                  Did you try defining the display container field in FakeDisplayPortalPnoto instead of in the Photo table? I think that would eliminate the refresh issue.

                  I'd set up this relationship so that I can just use PhotoID to display the image.

                  FakeDisplayPortalPhoto::gSelectedPhotoID = PhotoForDisplay::PhotoID

                  PhotoForDisplay would be a new occurrence of Photo and you'd replace your current display field on the layout with PhotoForDisplay::PhotoContainerInFM. Your script would be:

                  Set Field [FakeDisplayPortalPhoto::gSelectedPhotoID ; Photo::PhotoID]
                  Commit Record

                  You may not need commit record to see the image appear in the field.

                  • 6. Re: Layout Refresh issue
                    Fagreement

                    my database is SQL, so i can only create a caclulation field in FakeDisplayPortalPhoto, not  container.

                    is what you proposed as solution could work instead?

                    • 7. Re: Layout Refresh issue
                      Fagreement

                      hello?

                      • 8. Re: Layout Refresh issue
                        philmodjunk

                        Your question is shown as arriving at 12:42 AM my time. I tend to be asleep at that time.Wink

                        My suggestion does not use any calculation fields nor does it create any new container field, just data fields used in relationships.

                        • 9. Re: Layout Refresh issue
                          Fagreement

                          sorry but, i cannot get your point:

                           

                          Did you try defining the display container field in FakeDisplayPortalPnoto instead of in the Photo table? I think that would eliminate the refresh issue.

                          I'd set up this relationship so that I can just use PhotoID to display the image.

                          >> so i have to create in FakeDisplayPortalPnoto  a new field, right? that replace Photo::PhotoContainerInFM? so it will be a container that read from PhotoPath?

                          please !

                          • 10. Re: Layout Refresh issue
                            philmodjunk

                            Sorry, I see the confusion. I responded to two different issues and ran them together into a single post. I think your original script would have worked if you had defined a container field in the FakeDisplayPortalPhoto table.

                            I then suggested a much simpler method that does not require doing anything more than updating a relationship by copying the photoID number to a field defined in the FakeDisplayPortalPhoto table as this makes for a much simpler solution.

                            • 11. Re: Layout Refresh issue
                              Fagreement

                              but my actual relationship is as :

                               

                              should i create new link between photo and FakeDisplayPortalPhoto?

                              • 12. Re: Layout Refresh issue
                                philmodjunk

                                Do you know how to create new table occurrences? (this is done on the Relationships tab, not the tables tab.)

                                What you do is create a new occurrence of The portal's table and link your current occurrence of FakeDisplayPortalPhoto to it.

                                • 13. Re: Layout Refresh issue
                                  Fagreement

                                  ok, i created PhotoID in FakeDisplayPortalPhoto , and link the 2 tables together (photo and FakeDisplayPortalPhoto )

                                  and then?

                                  should i create the conatiner in FakeDisplayPortalPhoto ?

                                  sorry, i'm not following you 100%

                                  • 14. Re: Layout Refresh issue
                                    philmodjunk

                                    Then your script becomes:

                                    Set Field [FakeDisplayPortalPhoto::gSelectedPhotoID ; Photo::PhotoID]
                                    Commit Record

                                    And you can experiment with leaving out the commit record to see if it is really needed.

                                    This script assumes that you make your container field a button to run the above script.

                                    1 2 3 4 Previous Next