Solved

SharePoint 2010 InfoPath (Codeless) Default Due Date 2 Working Days into Future using XPath

Posted on 2013-10-28
3
1,107 Views
Last Modified: 2013-11-18
Hi,

There is a page out there that I cannot find, that I did find at one point, that helps you set your default due date to two working days in the future (holidays not accounted for - just Saturdays and Sundays) using XPath only.  I know about this post by alec: http://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/

There was a post that would essentially use XPath to look at the current day.  I believe this is how the post worked or how I think it should work: Since I want to add two business day from the date created, If created on Thursday, it would be due on Monday (add 5 days to Today). If created on Friday, add 5 days to [Today] to make it due on Tuesday.  If Created on Saturday (shouldn't happen but does), then add 4 days to  [Today] to make it due on Tuesday.  If Created on Sunday, then add 3 days to [Today] to make it due on Tuesday.

It may be more accurate to calculate 48 hours ahead then the eqivalent for 24 hours for each weekend day.
0
Comment
Question by:atljarman
  • 2
3 Comments
 
LVL 28

Assisted Solution

by:clayfox
clayfox earned 225 total points
Comment Utility
There is the built in function addDays() but it does not consider weekends or business days.
there is code that will do this but the only other option I know that is codeless is to create a list with first column startdate, next column 2daysout. If you have any other increments you could have columns for those too.
best way is to create a spreadsheet, I think Excel has the ability to calculate this, and then import the spreadsheet as a list.

create a receive data connection to the list and create a filter that sets due date with 2daysout where today() equals startdate.

hope that helps.
0
 

Accepted Solution

by:
atljarman earned 0 total points
Comment Utility
Thanks.  I was never able to implement this but appreciate the suggestion.  Maybe it will help someone else
0
 

Author Closing Comment

by:atljarman
Comment Utility
Not able to implement due to change in direction nor able to verify that the suggestion works.  Assigned points based on merit.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now