KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Utility method to return the name of a given process number
PRODUCT: 4D | VERSION: 14.3 | PLATFORM: Mac & Win
Published On: March 5, 2015

Here is a Utility Method that can be used for obtaining the name of a process:

// returns the name of the process number passed;
// returns name of current process if no parameter is passed
C_TEXT($0;$procName_t)
C_LONGINT($1;$procState_li;$procTime_li)
Case of
   : (Count parameters=0)
    // returns name of current process if no parameter is passed
   PROCESS PROPERTIES(Current process;$procName_t;$procState_li;$procTime_li)
   $0:=$procName_t
   : (Count parameters=1)
    // returns the name of the process number passed;
   PROCESS PROPERTIES($1;$procName_t;$procState_li;$procTime_li)
   $0:=$procName_t
End case



If this is saved as UTIL_getProcessName_t within your database it could be used like this:
SET WINDOW TITLE(UTIL_getProcessName_t)