Solved

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

Posted on 2013-10-28
3
1,148 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

636 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