Skip to main content

The ultimate goal is to be able to filter by a single date (Start Date) or by date range (between Start / End Date), and a Room Condition (Vacant Task is the name in the SmartObject) if specified. I was able to get the Room Condition to filter without any issue, however the dates are not filtering as expected. If I hard code a date in the view filter, it will work. If I pass a date from a calendar control, the filter does not filter the results.

 

The filter configuration (Left side is value being returned by the SmartObject, Right is the SmartForm control)

13719i5E2C737E0294B209.png

 

I have two views (Filter View, Worklist View)

11612iE28C8670E115DE1D.png

 

I have a list item click event to show the value of the Date of Move field:

15620iE1A7C79EFC7F7183.png

 

 

Fields available from the SmartObject:

17230i6C5388049E685372.png

 

Results from K2 Management when I execute the SmartObject:

15350i27AB84A84F725E34.png

 

Hi @Jason_Discover,

Perhaps try transfering the date from a calendar control to another control (like a datalabel), and use that control in your filter. You can use the when a control is changed event, fllowed by either a transfer data rule or set a control’s property rule to do so.

 

Kind Regards

Prineel


Unfortunately, I need to filter between all of the records displayed in the list view. Otherwise, that approach would work.


Hi @Jason_Discover,

 

Is the data coming from SQL Server? if yes, then you can create a stored procedure where in StartDate, End Date and Room condition will be the input parameter to the stored procedure. With this you don’t have to bother about the time zone.

 

Or try to set the Calendar control style and the list column start date column in the same location.

 

BR,

Divya Raj 


Hi @Jason_Discover,

 

Your advanced filter configuration should be able to filter between two dates using the calendar control and your textbox control. It wont be able to filter by a single date or without anything in the texbox because you are using the “And” operator so it has to filter by using all 3 requirements/parameters. However, if it does not filter if you have all 3 controls populated, then there might be something wrong. Please let us know which version of K2 you are using.

 

Kind Regards

Prineel


Reply