The knowledge base article that you refer to describes a method for producing a found set of records that exactly match text entered into a global field. It does this all on one layout. That layout must be based on the table occurrence in your relationship that uses the global field to match to a second occurrence of the same table as specified in the article.
OnLayoutEnter would not make sense for this as you need to first enter text (or select from a value list) in the global field before running the script. An OnObjectSave trigger on the global field or a button placed next to it could be set up to run this script.
But I am guessing about what you want to do here by reading the knowledge base article. I can't tell much from the post above that helps me understand what it is that you want to accomplish.
If "table occurrence" is unfamiliar, see: Tutorial: What are Table Occurrences?
Thanks for the comment PhilModJunk. To Elaborate: Im trying to "hard wire" a table, Elements. There are different kinds of elements.
The global field "fk_Filter_ElementKind" has a fixed, pre-assigned value (It does not need to be entered) and links to "Element Kind" with dropdown list in the other TO. It's like your TO example with one kind field fixed and referring to a TO of the same table.
You've helped me already with clarifying the layout needs to be part of the table that starts the relation with "fk_Filter_ElementKind". I' just getting a record repeat for a list form. so I'm assuming I need a portal, which I wanted to avoid ;(
I still can't quite picture what it is that you want to do. Do you want to set up a layout where you select a "kind" from the drop down and the layout automatically updates to show all records with exactly that value?
Or is it something else that you want to have happen?
No. I want a layout that only shows records of elements of the pre-determined kind. If you change the dropdown the record would disappear... Silly ?
In that case, ONLayoutEnter can set the global field to a specific value and the script can then use Go To Related Records to limit the current found set to all records of a specified kind. Keep in mind that any find then performed by the user will not be limited to that specific group of records unless you take additional steps to prevent that.
Thanks for the help ! It still would only display in a portal?!
no portal needed for this method.