You havenât shown it but if you want to add code to a browse you probably need to say so in your template declaration. eg for a Control template, the same idea applies to an Extension templateâŚ
#CONTROL(BrowsePrintButton,'Print record from a Browse Box'),DESCRIPTION('Print a Record from Browse on ' & %Primary),REQ(BrowseBox),FIRST,HLP('~TPLControlBrowsePrintButton.htm')
âŚthe REQ(BrowseBox) links your code to whichever browse box is selected when adding your template to the procedure. This then becomes the %ActiveTemplateInstance, you canât create that link yourself, so far as I am aware?
Otherwise, maybe some more detail about what you are looking for? It looks like some mixing of previously generated code into your template, which could be limiting.
What I have in place is a template that works fairly well. The template is designed to allow Insert, Change, Delete functionality to a browse (on the same window).
The problem (solved now) relates to, âwhat happens when the browse has NO records?â The template now has a âNo Browse recordsâ procedure, which will clean up any âstuffâ that is calculated or displayed on the window.
I am new to this group, and thanks for your concern.