`
Templates: Detect if Procedure is Browse or Form 2004-02-24 -- Alexander Newsgroups: softvelocity.clarion.templates Hi Alvin We use this method in some of our VIVID templates. It appears as being OK. Ironically the group is called %FormOrBrowse :-) It analyses procedure tempaltes and works in c5-c6 (and maybe in c4) Regards Alexander www.vividhelp.com ---------------------------------------------------------------------------- #! decalrations.................................. #ATSTART #DECLARE(%IsForm) #DECLARE(%ProcType) #ENDAT #! group def. .................................. #GROUP(%FormOrBrowse) #CLEAR(%IsForm) #FOR(%ActiveTemplate) #IF(INSTRING('RecordValidation',%ActiveTemplate,1,1)) #SET(%IsForm,%TRUE) #SET(%ProcType,'Form') #BREAK #ENDIF #ENDFOR #IF(%IsForm) #ELSE #FOR(%ActiveTemplate) #IF(INSTRING('BrowseBox',%ActiveTemplate,1,1)) #SET(%ProcType,'Browse') #BREAK #ENDIF #ENDFOR #ENDIF #! calling group ........................................... #INSERT(%FormOrBrowse) #IF(%ProcType = 'Browse') ............................. #ENDIF ---------------------------------------------------------------------------- -- "Alvin" Printed November 26, 2024, 9:55 pm This article has been viewed/printed 35206 times. Google search has resulted in one hit on this article since January 25, 2004. |