Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-10-28
3
Medium Priority
?
1,181 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 675 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Loops Section Overview
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

783 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