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.
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?"
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...
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.
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.
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.
"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.
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.
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?"
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.