Leave Request

1
Hi experts, Im working in leave request application , In this I’m trying to separate the leave request based on the department Eg If a person applying leave the leave request should get visible to onlt his department manager not to other department manager .Anyone one help me to find this I first created the department as separate entity and tried to connect but it was difficult so i changed this as enumeration In Xpath  i have to relate the Leave created department with the current user department   In this i found the leave created user department but while comparing with the current user it shows an error  How to achieve this how to identify the current user department   I want to give condition in Xpath  to identify the current users department and to relate with the request createdBy’s department    In this i try to relate the leave request created user with the current login users department ie(Managers department) At the same time i found leave request created by the employees  The problem iam facing is i cant able to relate the current user’s department  Help me in this scenario
asked
5 answers
7

Hi Sankar,

In addition to that you can follow these steps,

  1. After reteriving the account entity using current user you can retrieve the depart by using by association(Account_Departments).

 

  1. Or you can retrive department directly and use xpath for constrain, example

 

You can either follow these steps.

 

Step 2 i have done to reduce the retrieval because in step 1 we have used two activity, this is also one of the best practices and will be useful for performance

answered
4

Hi Sankar,

In addition to that you can follow these steps,

  1. After reteriving the account entity using current user you can retrieve the depart by using by association(Account_Departments).

 

  1. Or you can retrive department directly and use xpath for constrain, example

 

You can either follow these steps.

 

Step 2 i have done to reduce the retrieval because in step 1 we have used two activity, this is also one of the best practices and will be useful for performance

answered
3

Hi Sankar,

I have not fully developed you usecase,

Below is the screenshot for account and department,

 

If you want to retrieve all the leave request

  1. Retrieve the leave request and add xpath constraint with account and department, so that you will get all the leave request of that account and its associated department
answered
1

Hi Sankar, 

 

Correct me if I’m wrong, you’re trying to implement leave request application based on their department so that their department manager will be able to approve or reject. 

 

In this case, you’ll need to implement create simple leave request based on the current user. Once the person applies for the leave, you need to ensure that those leaves are shown to the particular department manager only. 

 

First, you can work with microflow from employee’s end which will consists of add leave request. Second, when manager log’s in, he’ll be able to see list of leaves only for his department. Here, you need to add microflow on the listview or datagrid (whichever you’ll be using to show leave list) where list of leaves will be based on current user’s department. 

 

I believe this logic will work for you. Please ping me if you need any help on the same. 

 

 Regards, 

 

Ashishkumar

answered
1

Hi Sankar,

 

you’ll need to retrieve the account first from DB, with [id = $currentuser], this can be used in the comparison.

 

answered