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

Moderators: ArturoRobles, ArturoRobles

By Aradolfati
#828412
Ironguts25 wrote: Sun Sep 13, 2020 8:32 pm Hi,
that is an interesting problem. So you want to choose who will get assigned to the "3rd" task based on what word the user logged selects in the first task?

There are probably many ways to manage this. My thought is to start with a drop down list with the appropriate selections i.e. Buy (Key 1,) Sell (Key 2), Return (Key 3) and so on. Then create a trigger that assigns a user name (hard coded username for Alex, Rebecca etc.) from the database to the selection, and use that username to find the usr_uid that will be store in a @@ variable. That variable name will be put in the "Variable for Value Based Assignment:" when you select the Value Based Assignment Rule in task 3.

The Trigger should be set to fire "Before Routing" in the first task.

I've attached an example process that may help to explain it better. Also, I hard coded the user names in the Trigger for simplicity and demonstration purposes but a better approach would be to use User Groups and assign users to the appropriate group. That way you don't have to change the code if the user changes. I can show you how to do that as well but I just wanted keep it simple for demonstration purposes.

I hope this is helpful.
thank you very much
but how can i open your attachment file?
By Aradolfati
#828421
Ironguts25 wrote: Tue Sep 15, 2020 5:09 pm Select the Designer menu, then select import and link to the file.
thank you my dear friend.
but i have a problem in code
Image
this is your code
on line 14 you wrote "ToTask3"
is this task name?

my task name is this>>>https://pasteboard.co/JrjwPtd.png

please help me
thank you
By Ironguts25
#828424
You mean the code in the trigger below?

That is the variable that stores the usr_uid of the individual that will be assigned to task 3. If you look in the Assignment Rules (right mouse click on task 3) you will see that variable name identified in the "Variable for Value Based Assignment:". That's how PM know who to assign the task to.

switch (@@transactionType) {//from Transaction Type dropdown list
case 1: //Buy
$userName = 'bjohnson'; //username from users database
break;
case 2: //Sell
$userName = 'syssuper'; //username from users database
break;
case 3: //Return
$userName = 'Btest'; //username from users database;
break;
}

$q = "SELECT * FROM USERS WHERE USR_USERNAME = '$userName'";
$result = executeQuery($q);
if (is_array($result) and count($result) > 0) {
@@userAssignedtoTask3 = $result[1]['USR_UID'];
@@userFullName = $result[1]['USR_FIRSTNAME'] . ' ' . $result[1]['USR_LASTNAME'];
}
By Aradolfati
#828446
Ok thank you but i have more questions

For example i have a input document in my sell Dynaform and the document is static

i mean when i want to create sell My document automaticlly load on my form

Can you help me?
thank you.
By Aradolfati
#828447
Aradolfati wrote: Wed Sep 23, 2020 2:32 pm Ok thank you but i have more questions

For example i have a input document in my sell Dynaform and the document is static

i mean when i want to create sell My document automaticlly load on my form

Can you help me?
thank you.
i mean i have only one static file and i want to upload it automaticlly
By Aradolfati
#828486
Aradolfati wrote: Wed Sep 23, 2020 2:33 pm
Aradolfati wrote: Wed Sep 23, 2020 2:32 pm Ok thank you but i have more questions

For example i have a input document in my sell Dynaform and the document is static

i mean when i want to create sell My document automaticlly load on my form

Can you help me?
thank you.
i mean i have only one static file and i want to upload it automaticlly
Can Anyone Answer My Question?
By Aradolfati
#828506
Aradolfati wrote: Wed Sep 23, 2020 2:33 pm
Aradolfati wrote: Wed Sep 23, 2020 2:32 pm Ok thank you but i have more questions

For example i have a input document in my sell Dynaform and the document is static

i mean when i want to create sell My document automaticlly load on my form

Can you help me?
thank you.
i mean i have only one static file and i want to upload it automaticlly
please answer to my necessary question
By Aradolfati
#828507
Thank you to Powerful support team
My Last Question is
if my User Supervisor and one of my dynaform he didnt assign to Dynaform's Tasks he can not Find it in a Review Part??
For Example
i have a dynaform
it name is "Buy request"
and this dynaform has many tasks but my supervisor didnt assign to tasks.
My question Is my Supervisor Cant See it in review Part?
Thank you :?:
Unable to create workspace

I have the same issue. Any solution? Thanks alex[…]

Install in ubuntu

Dear All, In our dev environment we did an upgrad[…]

Get data from oracle database.

How to display all data in a table from oracle DB […]

Hello everyone, I have the same route case issue, […]