10 Replies Latest reply on May 14, 2009 4:17 PM by philmodjunk

    Layout update not updating ???

    synergy46

      Title

      Layout update not updating ???

      Post

      I have two layouts:

       

      InputLayout where I input data.

       

      ReportLayout which is a sub-summary layout based ont he input data inn INputLayout.

       

      Problem:

      After inputting data into InputLayout's portal, and after switching to ReportLayout, the inputed records are NOT present unless I run a script which takes me to a different layout, does a 'find' and jumps back to the original script.  In that situation everything is 'normal'.  

       

      What I want is for some kind of 'refresh' to update the layout with the current records when I first enter it.  

       

      Refresh Window DOES NOT WORK

      Commit Records DOES NOT WORK

       

      I have put both of these in scripts that run "ON RECORD LOAD" and ON LAYOUT LOAD.  That does not work.

       

      Your thoughts are appreciated.

       

       

       

        • 1. Re: Layout update not updating ???
          mrvodka
             The report is based on the found set. If you add new items to the portal, then if you just go to the report layout, the newly added records will not be there. Instead, use a Go to Related Records step to go to the report layout.
          • 2. Re: Layout update not updating ???
            synergy46
              

            I am selecting the ReportLayout from the layout menu.    After the layout loads, it fails to show the new records added in the INPUTLAYOUT portal.

             

            I presume you mean to create a script with Goto Related Record in it's content.  Are you saying I should attach this script to a ScirptTrigger like "on layout load?"

             

            • 3. Re: Layout update not updating ???
              mrvodka
                 No I mean on the parent layout where you have the portal, use a button to go to the related records using the reports layout...
              • 4. Re: Layout update not updating ???
                philmodjunk
                   Mr. Vodka is correct, but if you don't want the button you could script a find and use the trigger you describe, then any method that switches you to that layout will automatically update the found set to include any new records by firing the script trigger.
                • 5. Re: Layout update not updating ???
                  synergy46
                    

                  Right.  I have a script that goes to another layout, does a find (which updates the found set) and then returns to the desired Report Layout.  I am sure this will work. 

                   

                  But, it begs the sitution:  "If I select the ReportLayout from the Status Menu and have a script trigger attached to the 'finding' script it goes into an endless loop because it is called from ONLOAD which executes the script which as it's last step, goes back to the ReportLayout which get's loaded and calls the ONLOAD script trigger etc.... Hmmmm.... perhaps I could open a new window for the 'find' operation then just close it which would eliminate the need to recall the LayoutReport layout....??  I will have to try it.

                   

                  Thanks for your thoughts.

                   

                   

                  • 6. Re: Layout update not updating ???
                    synergy46
                      

                    Script

                     

                    This script is called from a popup and selects the 'patient' whose tests are to be reported on.  This script works and refreshes everything.

                    BUT, when the layout first opens it is NOT updated.  I must redundantly go to this popup and reselect the patient to make the data current.

                     

                    I am trying to get the layout to update itself when it is loaded..... If I call this script from an ON LAYOUT LOAD it goes into and endless loop.  

                     

                    grr(&(&(SD&(&SD(&*F  I think there is something 'fundamental' I am missing here.... Thanks for your help.

                     

                     

                    • 7. Re: Layout update not updating ???
                      philmodjunk
                        

                      "I have a script that goes to another layout, does a find (which updates the found set) and then returns to the desired Report Layout. "

                      The script trigger that does the find needs to be set to trigger on LayoutLoad of the layout where you want the find to perform. I don't get why you do the part I styled in bold. I assumed you wanted to see the updated list whenever you navigate (by layout menu pick or button) to that layout.

                       

                      We can only talk generalities here without delving more into the details.

                      • 8. Re: Layout update not updating ???
                        philmodjunk
                          

                        You posted while I was posting. :smileywink:

                         

                        Don't change layouts. Since both layouts refer to the same table, you don't need to switch layouts just to perform a find. Since you won't be changing layouts, you won't be triggering the on layout load in an endlessly recursive loop.

                        • 9. Re: Layout update not updating ???
                          synergy46
                            

                          That worked like a charm!!!  Thanks.  It does 'beg' the question, "What do I do if the layout was based on more than one table?"

                           

                          R

                          • 10. Re: Layout update not updating ???
                            philmodjunk
                              

                            Technically, your layout can only be based on one table. That's the table you select in Layout Setup...

                             

                            Your found set is thus a set of records from that one table. Any related data you place on the layout whether in a portal or directly on the layout, can be used in a find, but you are really still finding records in the underlying table and any related data that is visible is controlled by the relationships you've defined in your Relationships Graph.