To access this type of information from within your app you need to use the template language symbols %Procedure and %Prototype. The Small extension template shown below will achieve this - it can be attached to any procedure and will setup various local variables such as ProcedureName and set them in the Procedure Setup Embed point. Click Here to download the code. #TEMPLATE (GetProcedureName, 'Get Proc name'),FAMILY('ABC'),FAMILY('CW20') #! #DISPLAY('') #DISPLAY('Another Freeware template from Sterling Data') #DISPLAY('') #DISPLAY('A template to display Procedure info') #DISPLAY('') #DISPLAY('More template examples available on :') #DISPLAY('www.sterlingdata.com') #! #EXTENSION (GetProcExt, 'Get Proc name extension'), PROCEDURE [1] #LOCALDATA [2] ProcedureName STRING(30) ProcedurePrototype STRING(60) ProcedureType STRING(20) ProcedureDescription STRING(60) ! Short Description #ENDLOCALDATA #AT(%ProcedureSetup) ProcedureName='%Procedure' #FIX(%Procedure,%Procedure) [3] ProcedureProtoType='%Prototype' ProcedureType='%ProcedureType' ProcedureDescription='%ProcedureDescription' #ENDAT Notes: [1] PROCEDURE - this template will be availabe for adding as an extension at the Procedure level (not at the Global Application level) [2] #LOCALDATA - variables here will placed into the local variables section - from within procedure properties you will be able to click on the Data button to see them. [3] #FIX(%Procedure,%Procedure) - %Procedure is a multi-value symbol - it will contain as many entries as you have procedures in your app. #FIX allows us to say which particular value we are interested in (in this case whatever the current procedure is). The variables such as %ProcedureType etc. are "dependent" on %Procedure. In other words you must specify which instance of %Procedure you want before these "subsidiary" variables will have any use. |