Hi Friends,
Here i’m developing the leave application, in this i want to show how many leaves he taken in a particular month, suppose if he takes PL 3 days in 1st june and again taken CL 2 days in 20 th june i want to show his leave details in a single document how can i handle it, i’m little bit confuse on it , here i’m getting two documents in the view , i want to club those documents respective to the particular employee, please help me in this assist i’m new to Lotus Environment. waiting for ur responses
Thanks in advance…
Subject: problem in showing content in the views
Hi
yes, two documents will be shown as there are two leaves pertaining to the particular person for the month.
For showing it in a single document, you can have a separate document wherein the fields can be -
person name
month & year
no of pl leaves
no of cl leaves
as soon as the leave document is approved, update in this document also for the person & corr month & year.
for eg. person X - month/year 0605 2 pl 3 cl
if one more CL is approved . just update as 4 in the same doc. then u can show this in a separate view.
HTH
regards
ramesh
Subject: RE: problem in showing content in the views
Thanks for ur response, here i wrote agent that automatically updates leave records when it was approved, but how can i creae another form using this please give some reference code for this as u know i’m new to lotus environment.
Waiting for ur reply.
Subject: RE: problem in showing content in the views
Usually such totals are displayed in a view. Create a view that categorizes leave documents by employee name (or employee ID) and then categorizes them further by month (e.g. using the formula @Date(@Year(LeaveDate); @Month(LeaveDate); 1) )
Then, add a column whose formula is 1 – just that – and use the column properties to specify that this is a totals column, and tick the “hide detail values” box.
If you want to display the number on a document, you could use a computed-for-display number field with a formula such as @Elements(@IfError(@DbLookup(“”; “”; “LeavesByEmplAndDate”; EmplID + “/” + @Text(@Year(SomeDate)) + “/” + @Month(SomeDate); 1); “”)
Of course you then need a view named LeavesByEmplAndDate that contains leave documents sorted by a string composed of the employee ID and the year and month of the leave.