jacquenv
Workflow Hero

Complex query?

Jump to solution

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.

0 Kudos
Reply
2 Replies
eharris04
Workflow Hero

Re: Complex query?

Jump to solution

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. 

View solution in original post

Reply
jacquenv
Workflow Hero

Re: Complex query?

Jump to solution

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.

0 Kudos
Reply