Solved

Complex query?


Badge +6

I have a query in my workflow that looks at an Out Of Office list and queries 3 columns, to get the Delegate To person to assign the task to:

 

Delegate From = Approver

Start Date <= Today

End Date >= Today

 

However, I was wondering if it was possible to allow the End Date to also be NULL? Like if someone (ex: a high level person) wanted to delegate all tasks forever, how do I build the query that says:

 

Delegate From = Approver Assigned

Start Date <= Today

(End Date >= Today OR End Date IS NULL)

 

I tried adding the NULL to the query but I get the wrong result.  I set up 2 Out Of Office items, one with a date in range and a date starting next week with no end date.  I get the result for next week.  I also removed the end date from a few others and it picked the first result with a NULL End Date.

icon

Best answer by eharris04 16 May 2019, 21:45

View original

2 replies

Badge +17

You cannot have a nulll value for the date field. Would it be better to reassign a task to someone else versus delegate for forever? Just change who the task is assigned to and keep it going. 


 


If we think about task as something to do, you're not going to have something sitting out there open for forever, or every time just send it to someone else. After a while, you'll simply just remove the person who keeps delegating and assign it to the person they keep delegating to. 

Badge +6

That's just the nature of goverment thinking.  They had attempted to do this in the other version (before I got here) and left the end dates null so their delegations never worked and no one bothered to figure it out, I was only trying to see if I could provide a solution along those lines. 

 

I see your thought process on this, makes sense.  I think I will just put a comment field in that list I get the name from (I moved it out of the groups and into the list I use for all the budget accounts) and notate that it is being delegated as of whatever date until otherwise noted.

Reply