Page 1 of 1

GETTING THE DATA FROM THE USER WITH DEPARTMENT KEY

Posted: Tue Jul 04, 2017 9:35 am
by Madz7104
Hi...

I am trying to to pull the data from the user table, but I need to specify the department, Ex. All employee at accounting department will be list in the dropdown control.

How can I do that.? Help.

Re: GETTING THE DATA FROM THE USER WITH DEPARTMENT KEY

Posted: Tue Jul 04, 2017 3:05 pm
by amosbatto
If your "Department" dropdown has the ID "selectDepartment" and is associated with a variable of the same name, then you can use use this SQL query in the "Department" dropdown:
SELECT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='DEPO_TITLE' ORDER BY CON_VALUE
and this SQL query in the "Employee name" dropdown:
SELECT USR_UID, CONCAT(USR_FIRSTNAME, ' ', USR_LASTNAME) WHERE DEP_UID=@@selectDepartment

See: http://wiki.processmaker.com/3.1/Dependent_Fields

Re: GETTING THE DATA FROM THE USER WITH DEPARTMENT KEY

Posted: Mon Sep 18, 2017 7:10 am
by jackluter
userDetailsManager.getStringProperty(user, "position");