Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
By sbarnard
#784209
I'm looking for a way to include the name (first and last) of the person who created a case as a process variable, so that person's name can be easily displayed on forms, etc. throughout the workflow. Can this be done with a trigger (and if so, how)? Or some other method?

Thanks in advance!
User avatar
By amosbatto
#784230
Create a trigger with the following code:
Code: Select all
$aUser = userInfo(@@USER_LOGGED);
@@caseCreator = $aUser['firstname'] . ' ' . $aUser['firstname'] . ' (' . $aUser['username'] . ')';
Then set the trigger to fire during the first task of your process.

In subsequent tasks you can display this information in any DynaForm. In PM 2, create a read-only textbox in your form named "caseCreator" and the information will be displayed. In PM 3, create a string variable named "caseCreator" and assign it to a read-only textbox.
By sbarnard
#784251
Great, thanks so much!

I'd also like to do the same with the case creator's email address... would this code be correct?
Code: Select all
$aUser = userInfo(@@USER_LOGGED);
@@caseCreatorEmail = $aUser['email'];

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]