Solved

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

Posted on 2013-10-28
3
1,127 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
ID: 39605332
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
ID: 39644168
Thanks.  I was never able to implement this but appreciate the suggestion.  Maybe it will help someone else
0
 

Author Closing Comment

by:atljarman
ID: 39655863
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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