We have a view that is shared with our contractor showing jobs completed today as well as jobs due tomorrow. We do not work on Saturday so Friday's view doesn't have anything due tomorrow. I set up and shared another view to show the jobs with a due date 3 days from now to help account for this issue on Fridays. Is there a way to combine both views by showing only the next "business" day?
Paul Kubat shared this idea · Apr 18, 2018
Comments
2 comments
This is possible by using the DAYOFWEEK function. There may be other ways of doing it, but this is how I just tested with.
This function returns the number of the week (1-7) for a given date. The weeks starts with Sunday as "1".
"Test Date" is the name of your date field.
I used a calculated number field incase you need/want to count the number of records due on a given date - you can sum the 1's together.
if(dayofweek({Test Date})=1, 0,
if(dayofweek({Test Date})=2, 1,
if(dayofweek({Test Date})=3, 1,
if(dayofweek({Test Date})=4, 1,
if(dayofweek({Test Date})=5, 1,
if(dayofweek({Test Date})=6, 1,
if(dayofweek({Test Date})=7, 0,
0)))))))
HERE IS THE DESCRIPTION FROM THE DATE FUNCTION IN THE KNOWLEDGEBASE:
Returns the number (1-7) that corresponds to the day of the week for a date field. Sunday is assigned the value of 1.
Use in a Calculated Text or Calculated Number field.
When {Date} is June 15, 2017, dayofweek({Date}) returns 5 (Thursday).
Gives the same result as weekday().
Hi Paul.
Thank you for reaching out!
What John proposed is accurate. Depending on the specific scenario you are looking for, more logic might be needed in the calculation. If you would like a more customized response, send us the details of your question including the name of the App/Table/View to support@trackvia.com.
Regards,
Cristina
Please sign in to leave a comment.