Page 1 of 1
phone of user designated to the next task
Posted: Thu Jul 07, 2022 4:40 pm
by enttsh
i use this Triger and i have next user _uid
$taskUID = '60378024762bb353abac6e9081817724';
$aUser = PMFGetNextAssignedUser(@@APPLICATION, $taskUID);
@@nn= $aUser['USR_UID'];
ok now how can i have the user phone number?
i added this :
$result = executeQuery("SELECT USR_PHONE FROM USERS WHERE USR_UID='@@nn' ");
@@mm= $result;
but just show [ object object ]
please help me
Re: phone of user designated to the next task
Posted: Sun Jul 10, 2022 12:04 am
by Ironguts25
Instead of running a query why not use the following function after the line @@nn=$aUser['USR_UID'];
$aUserInfo = PMFInformationUser(@@nn);
@@mm = $aUserInfo['phone'];
Incidentally, ProcessMaker system and case variables can not be inserted in double quoted strings. You first need to assign to a normal PHP variable and then insert in double quoted string:
$UID = $aUser['USR_UID'];
$result = executeQuery("SELECT USR_PHONE FROM USERS WHERE USR_UID='$UID' ");
@@mm= $result;
Hope this helps.
Re: phone of user designated to the next task
Posted: Sun Jul 10, 2022 11:39 pm
by enttsh
I truly appreciate you, you’ve made my day!
Re: phone of user designated to the next task
Posted: Mon Jul 11, 2022 1:59 pm
by enttsh
Ironguts25 wrote: ↑Sun Jul 10, 2022 12:04 am
Instead of running a query why not use the following function after the line @@nn=$aUser['USR_UID'];
$aUserInfo = PMFInformationUser(@@nn);
@@mm = $aUserInfo['phone'];
Incidentally, ProcessMaker system and case variables can not be inserted in double quoted strings. You first need to assign to a normal PHP variable and then insert in double quoted string:
$UID = $aUser['USR_UID'];
$result = executeQuery("SELECT USR_PHONE FROM USERS WHERE USR_UID='$UID' ");
@@mm= $result;
Hope this helps.
for the first one ( the person who start the process i have his user with this triger before dynaform code:
@@first = @@USER_LOGGED;
and for the second one i used this new triger before dynaform :
@@second = @@USER_LOGGED;
now when i use @@second in Variable for Value Based Assignment: it shows error
Task doesn't have a valid user in variable second or this variable doesn't exist.
how can i have the second username logged like the first one ?
Re: phone of user designated to the next task
Posted: Wed Aug 03, 2022 10:20 pm
by Ironguts25
Sorry I did not see your reply until now.
I'm not sure I understand what you are tying to accomplish. Perhaps you can post an image of your process. In the meantime here's an example for a multi-step approval. You can download the process and try it yourself.
https://forum.processmaker.com/viewtopic.php?f=40&t=737679
I hope this is helpful.