Hi Mani1,
Both options could work, but using the same form for both employee and management will greatly benifit from states.
You best option in my opinion would be to create a form spesiically for employees and one spesifically for managers, this way you can customize each for spesifically for the departments needs.
-Jean
Hello Jean,
Thanks for getting back to me.
I like your idea of creating two forms. As I am a newbie to K2, I don't know at this point how to send the information of employee form to the manager form (as read-only). I want the employee details to be opened when the manager clicks on the task list in his/her email.
Can we accomplish this using parameters? Can you please point me to some documentation? I am really blocked at this point. I really appreciate your help.
Hi mani1,
Yes you will use Form Parameters to accomplish this.
Here is how you could do this (you can just expand as needed):
1. I have 2 SmartOjects, one for Employees and one for Leave Requests
(For this example i wont set up an association)
2. Create your User Form, and drop a hidden Data Label to save the Leave Request ID on Submit
4. In the "Submit" Buttons rule (which executes the SmartObject Create), also make sure to save the Leave Request's ID to the hidden Datafield using the Transfer Data rule.
5. Create a Workflow that starts when the "Submit" button is clicked, also create a datafield called "LeaveRequestID"
6. Once you do this it should create a new Action in your "Button click" rule, edit this rule and transfer the Hidden Data Label value to the Process Datafield
Now you have control over the Leave Request ID, and indirectly the Employee ID
7. Create the Manager Approval Form and make sure to add one Parameter called "LeaveRequestID"
8. In the Rules, under the "Initializing" rule create a rule that will Load all the details based on the Parameter Value
9. Now back in the Workflow you can add a User Task and integrate with the Manager Form
10. Make sure to send the Datafield to the Parameter
This is the basics of it, you can also go have a look at the K2 Learning material, but not sure if they integrate with multiple forms:
https://help.k2.com/k2lc-sf1
-Jean
Hi Jean,
Thanks a lot for your help. I really appreciate it. I will implement it and if I have any questions, ill get back to you.
Hi Jean,
Greatly appreciate your response and I learn form it somewhat. But I'm stuck at the steps 4,5 & 6.
I'm new to the Development and wonder if you can elaborate a bit. For me it's 5.3 version.
I tried by creating a data label in User Request Form, but couldn't find the exact data label under control as you shown in the step 4 screenshot.
It will be helpful if you can elaborate a bit to reach my level of understanding.
Can you please show a screenshot of your Submit button's rule? I am assuming there would be a call to "Create" a record via SmartObject in this rule. If so, can we see a screenshot of that as well? I can try to show you on your own screens where the fields you need to use are located.
Thanks for the response @tbyrne777
Let me explain again,
I have a WF with 2 Views (1 is Item View to capture the data and another is List view to show the existing request details)
Created 2 forms, one is for Leave Request submission with basic rules that will store data into Item View.
And i have created another Form to Approve the leave request which looks like below
And below is the simple snap of the WF
I hope, you got the idea of how its designed.
Requirement:
I want the Approval form to load with the submitted request details as a read only. Kindly help me on how to achieve this ?
Thanks in advance!
Ok - so does the "Leave Request" Form start the "Leave WF" workflow process when the Create button is clicked? The "Start a Workflow" rule will have a way to pass data to the workflow (presumably a Request ID) when you can then pass into your Approval form as a parameter when you create the approval task.