Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#789367
Hi,

We have configured ProcessMaker Application in Android SmartPhone. But when we try to display the System Variables like @@USR_USERNAME, we are not able to get the values for system variable. It shows blank for @@USR_USERNAME.
We have used the following query to get the logged in user name. We have assigned this query to textbox.

"SELECT CONCAT(usr_firstname, ' ', usr_lastname) as usr_firstname FROM users u
where Usr_username= "@#USR_USERNAME"
#789382
Create a text field in your DynaForm whose variable is named "USR_USERNAME". Use the following JavaScript in your DynaForm to hide this text field so it isn't visible to the user:
Code: Select all
$("#USR_USERNAME").hide(); 
Then your SQL query should work correctly:
Code: Select all
SELECT CONCAT(USR_FIRSTNAME, ' ', USR_LASTNAME) AS usr_firstname FROM USERS 
WHERE USR_USERNAME=@@USR_USERNAME
#795723
forutanrad wrote:Hello. I want to use this item in other forms, but it works in the first form but does not work in other forms.please help me.
You need to have a hidden field with the ID "USR_USERNAME" associated with the variable "USR_USERNAME" in every DynaForm where you want to use the SQL query. Export and post your DynaForms if you can't figure it out.
#795733
forutanrad wrote:Yes, but the following forms display the information user to the first form of the diagram and not accept the new user in another forms.
I'm not sure what is your problem and it is hard to know without seeing your DynaForms. However, this is far easier to do with a trigger, if you just want to display information about the current logged-in user in each form.

First, in your DynaForms add a text field which is associated with the variable "currentUser".

Second, create the following trigger:
Code: Select all
$aUser = userInfo(@@USER_LOGGED);
@@currentUser = $aUser['firstname'] .' '. $aUser['lastname'] .' ('. $aUser['username'] .')'; 
Set this trigger to fire before all the DynaForms containing the "currentUser" field. This way it will update before each form.

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[…]