Applies to: posted in the Clarion 6 group; the thread does not name a template chain.
Problem
An app had about 50 update (FORM) procedures. The poster wanted to add a few lines of custom code to all of them, priming some fields on a condition, in one go. A code template would still have to be added to each procedure by hand.
Solution
- Write a global template, an #EXTENSION, that inserts the code into all or some of the procedures. Look up #EXTENSION in the help.
- In it, place the code with an #AT statement that is restricted by procedure template:
#AT(%WindowManagerMethodCodeSection,'Init','(),BYTE'),PRIORITY(6001),WHERE(%ProcedureTemplate='XXX')
your code here
- Replace XXX with the procedure template you want to reach, for example 'window' or 'report'. Other embed points can be chosen the same way.
- Alternative: a ready-made $50 third-party template, Conductor, does this through a global extension.
Caveats
- The #AT snippet is offered as a start ("this should get you started"), not a finished template.
- The original poster answered that the advice "sounds like it is exactly what I needed" but did not report the finished result.
- The thread does not say which of the two routes he took.
Today (2026)
The #AT with WHERE restriction is template language and is likely unchanged on current Clarion; not re-tested. The third-party product named is from 2007; its current status is not known.
Sources: Arthur K. (Sep 2007, the question), Peter H., Paul H. (Sep 2007) in softvelocity.public.clarion6.