SmartForms - dynamic approver (get dept head id from database)

  • 20 August 2015
  • 5 replies
  • 0 views

Badge +7

This is our first smartforms Application and we are stuck at one point.

 

One employee creates a request in smartforms, but the approver is his/her department head,  dept head info is from database, from a particular table

we send employee ID as parameter and it returns us dept head id or email.

 

I tried adding sql server service based on all previous topics in this forum, but it just didn't work out,

please help or guide me, we are in a fix.


5 replies

Userlevel 5
Badge +16

Hi Prise,

 

Can you attach some screeshots of your table schema? are you using Read Method?

 

if you try to read dept head info using smartobejct tester tool, are you able to get the info?

Badge +7

 

Hie Mustafa,

 

yes when i use smart object tester i can read data, I tried ADO query and i can write select query with a where clause.

scenraion is

 

one of company employee create a request, and submits it, in K2 Studio I have smartforms client event where destination user is requester dept head and we get the dept head email from employeedata table.

 

Issue is, when any user creates a new request, how can we add his dept head as destination user.

 

 

 

12581i0134F957989CD53C.png

Userlevel 5
Badge +16

Hi Prise,

 

according to the last question, you'll have to add a data field on your process and before the start workflow rule you need to get(read) the employee department head name (retrieve it to a hidden text box or datalabel) then on the start workflow rule map the department head name to the data field you added on the process.

 

Update:

 

Set the data field in your destination.

 

let me know if you have any further questions. 

Badge +7

Hi Mustafa,

 

Yes, Thats a good idea, i will try it out, hope it works out for us.

 

Thank you.

Badge +7

a bit more detailed query

 

we have travel request smart object, user submits travel request and it will go to his dept head for approval.

we get dept head info from employeeData smart object

 

in employee data i manually added - K2 Domain/ EmployeeID associated with their Dept Head Employee ID as image below

 

16319iE75C1E4D5CCB9C53.png

 

 

Travel Request Form screenshot ---

15217i2D46B3415512BAEC.png

 

4) Dept Head EN is associated with smart object as image below

15591i94D249AC150829BE.png

 

Reply