This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Oct 6, 2015, 4:15 PM
51 Posts
topic has been resolvedResolved

View Filtering

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role:
  • Tags: View Filtering
  • Replies: 4

Hi All,

I have one Timesheet form, where I want to filter my already applied leaves based on my month selection,

For example already applied leaves in a view,

Requested Date

Leave From

Leave To

Paid

Unpaid

Total Days

July 15, 2015

July 20

July 25

04

02

06

Aug 10, 2015

Aug 12

Sep 05

20

05

25

Nov 22, 2015

Dec 01

Dec 08

02

06

08

 

If I select month July in my timesheet it should display something like this,

Requested Date

Leave From

Leave To

Paid

Unpaid

Total Days

July 15, 2015

July 20

July 25

04

02

06

 

Also if I select August and September, it should display this below entry,

Requested Date

Leave From

Leave To

Paid

Unpaid

Total Days

Aug 10,2015

Aug 12

Sep 05

20

05

25

 

Because this leave took days from two months Aug and Sep.

How I can do this ?

if Using categorized columns/view filtering, how it can be implement ?

 

Thanks in advance.

Oct 6, 2015, 6:23 PM
26 Posts
You could use @explode, with @month and @unique
Explode your date range, get the months, then get the unique months.
Oct 6, 2015, 8:16 PM
453 Posts
so

is each line a separate Notes Document? and each document would be related to an employee? If this is the case then I would consider reading all leave requests for a given employee into something like a Java method that would evaluate the dates and return a Scope variable of a class of leaveRequest that would define all of the fields values from the Notes Document/s that match the date range. Now from that build your timesheet or whatever. Then use the returned value/s in a repeat control.

I'm not entirely sure I understand what is happening.

 

Oct 7, 2015, 1:37 AM
110 Posts
If you insist on using categorized column/view filtering

If this is a newly built application, then maybe it's not too late to add an extra field (let's call it "leaveMonths"). This "leaveMonths" field will store text value like following (from your first example):

leaveMonths
072015-072015
082015-092015
122015-122015

If this is an existing application, then I'd suggest you just write a simple LS agent to insert the leaveMonths to each existing Timesheet document.

Once the above is done, create a Notes View which the first column is the leaveMonths (make sure it's categorized and sorted).

Then, on your viewpanel, compute the "Filter by category name" with the value for example "viewScope.selectedMonths".

And finally I assume you page should have the following 3 controls:

control function
DateTimePicker 1 to select the first month
DateTimePicker 2 to select the second month
Button
  1. set the value of viewScope.selectedMonths to something like 082015-092015 (based on what you select using both the DateTimePicker)
  2. Refresh the whole page

The above is how I would approach the problem if my understanding is right. I didn't do an actual test. Although I'm not quite sure why on one situation you can select just 1 month (July) and on another situation you can select 2 months (August and September). Will there be another situation where you can select 3 months, 4 months, and so on? If the no. of months you can select varies then maybe my approach is not suitable.

Oct 8, 2015, 3:02 PM
51 Posts
View Filtering

Thank you all,

I have done the first method what Mr. Carl Tyler said, Because this is exactly i am looking for.

Explode your date range, get the months, then get the unique months.

Then from the view column category I used the technique of  Show multiple value as separate entries.

But I don't know how it will affect the performance of the application ?

 

 


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal