Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Wilford
#794078
I'm getting an error in a process I'm trying to create and I'm not sure why..

Image



I have created a Dynaform with a couple dropdown fields I am populating with SQL Queries
I am looking up a list of users based on group membership to populate the drop downs, so I can use the values for case assignment

@@NotifySupervisor
Code: Select all
SELECT
users.USR_EMAIL,
CONCAT (users.USR_FIRSTNAME,' ', users.USR_LASTNAME) as NAME
from users inner join group_user on users.USR_UID = group_user.usr_uid inner join groupwf on group_user.grp_uid = groupwf.grp_uid where groupwf.grp_title = 'Supervisors' ORDER BY NAME;
@@NotifyMgmt
Code: Select all
SELECT
users.USR_EMAIL,
CONCAT (users.USR_FIRSTNAME,' ', users.USR_LASTNAME) as NAME
from users inner join group_user on users.USR_UID = group_user.usr_uid inner join groupwf on group_user.grp_uid = groupwf.grp_uid where groupwf.grp_title = 'mfgmanagers' ORDER BY NAME;
I created a report table to see what is going on, and the variable is being assigned a value, although I haven't done anything with it in my process yet.
I thought maybe it's the USR_EMAIL it's objecting to so I changed the query to return USR_UID, then USR_USERNAME but no matter what value I populate that variable with I get the same error.

Image

I have the managers and supervisors groups I am querying in the Assigned users List under assignment rules as I saw that in a previous thread on this topic.

Not sure what I am doing wrong. Any guidance would be appreciated.

Thank you

I've attached the Dynaform and project export if needed
Attachments
Project Export
(136.49 KiB) Downloaded 318 times
Dynaform
(11.45 KiB) Downloaded 296 times
Last edited by Wilford on Fri Jul 28, 2017 10:52 am, edited 1 time in total.
#794109
Found the issue. I thought the process was not making it past the first step (failing to submit) due to the error.

Turns out @=NotifySupervisor was the value in the assignment field in the second step of my process. (note to self, learn how to properly use variables in processmaker)

changed @=NotifySupervisor to @@NotifySupervisor at which point the error changed to Supervisor1@domain.com isn't a valid User ID.

Altered the SQL Query to retrieve USR_UID instead of USR_EMAIL and the process is happy now.

Located the issue by searching the process I exported to upload here, in my text editor. I noticed the following statement
<tas_assign_variable><![CDATA[@=NotifySupervisor]]></tas_assign_variable>
was under a title for the second step in my process rather then the first.

My initial trouble was knowing where in the process the error was happening, I was spending all my time looking in the wrong place.

Just wanted to post that I found the problem.

Thanks

Try the CloudMigration PST Converter to convert […]

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