'Do Search For' on Date gives wrong operators?

I want to filter a Search for Tasks, but I seem to be getting the wrong operators (if that’s the right word for it).

Context: The goal is to have a list of Tasks that only includes tasks that are not yet done or are done recently (last 7 days but people should be able to adjust preference), so I add a date to Tasks when the status is set to Done: the DoneDate. When filtering for ‘Only show tasks where DoneDate > Day of 7 days ago’ it also hides all the not-yet-done tasks where the DoneDate is empty, so I need to switch to a date range and exclude when the DoneDate is between some arbitrary, very early date (1 jan 1990) and 7 days ago. Which would be fine, but it seems like I’m getting the wrong operators.

@emmanuel Is this a bug or should I solve this in a different way? I know I could use a :filter or :advanced, but that’s slower and this is the default list people see when loading the page.

Hi there, @wardvangasteren… I’m guessing I don’t understand your post correctly because what I think you are describing should be pretty easy to do. When the user wants to see tasks that are not done yet, it should be as simple as a search for tasks with a constraint where Status <> Done. When the user wants to see tasks that have been completed within the last 7 days, switch the data source to a search for tasks with constraints where Status = Done and where DoneDate >= Current date/time:rounded down to date +(days): -7. Also, I don’t think there is any reason you should need to use a date range field.

Regardless of whether or not I have understood your post correctly, it is unlikely to be a bug that is tripping you up. Oh, and sorry I’m not Emmanuel, but it was also unlikely that he was going to reply. :wink:

Best…
Mike

Hi Mike! Yes it still probably is a bug, because I think it is meant to be possible to use date ranges.

But I want people to be able to see all tasks that are not done ánd those that where done recently in one view, just so that tasks are not instantly gone when they’re set to completed, because then people have to scramble and search for whether that task is completed or gone, since it’s out of their view.

Try merging two searches together in the repeating group’s data source. If you want the tasks that are not done yet to appear at the top of the list, do the first search in my initial reply and used the merged with operator to merge that search with the second search in my initial reply. With that data source in place, you will see a list of tasks that are not done yet followed by a list of tasks that have been completed within the past 7 days.

What’s less workload intensive / faster for loadspeed: Merging two shorter lists together or filtering the longer list afterwards?

I don’t know how you would filter the list to get the result you said you wanted, but I would do exactly what I described. I definitely would not use an advanced filter, if that’s what you mean.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.