Adding 3 business days to "due date" (date/field picker) - InfoPath Dev
in

InfoPath Dev

Adding 3 business days to "due date" (date/field picker)

Last post 04-28-2016 01:32 PM by kristen.hartung03. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-27-2016 02:26 PM

    Adding 3 business days to "due date" (date/field picker)

    I have a task that I want to set due three business dates from today.

    Current set up:

     Field 4: (date/time picker w/ time element hidden)

    Due date: (Date/time picker w/ date element hidden. This has a rule connected to it that when the date is picked in field 4, it adds 62,800 seconds to set it with a that date & a 5pm due time)

     The above two fields are sitting together so that it looks like a normal due date to the user. 

     

    I now need to default the Field 4 to three business days from today w/o using the now() function because the now() function would mess up my 5pm due time. 

     Also, my form is connected to sharepoint so no coding allowed. Only formulas. *sigh*

  • 04-28-2016 08:51 AM In reply to

    Re: Adding 3 business days to "due date" (date/field picker)

    The AddSeconds option, was just not working for me. 

    If you use the Add Days function instead of the AddSeconds, you can then use the now () option.

    Add a now () field with the following formula as a default value - substring-before(now(), "T"),

    Then you can use the following to work out business days - http://www.nothingbutsharepoint.com/2012/11/06/sharepoint-validate-business-day-in-infopath-date-picker-aspx/

    then you can add some rules to set your DueDate field etc. based on the calculated date filed as per link.

  • 04-28-2016 01:22 PM In reply to

    Re: Adding 3 business days to "due date" (date/field picker)

    Add a now () field with the following formula as a default value - substring-before(now(), "T"),

     

    Trying to make this part work..... I've tried:

     substring-before(now(), "T")  (tries to fit both the time and date in the same box so all I see is the date and it's got the red verification boarder around it)

    substring-before(now(), "T17:00:00") (shows nothing)

    substring-before(now(), "17:00:00") (shows nothing)

    substring-before(now(), "T"),"17:00:00" (it doesn't like the comma in between the closing parenthesis and the quote-it errors)

     

     

  • 04-28-2016 01:30 PM In reply to

    Re: Adding 3 business days to "due date" (date/field picker)

     also just tried concat(substring-before(now(), "T"), "17:00:00") and the outcome was 2016-05-0317:00:00 all in one box

  • 04-28-2016 01:32 PM In reply to

    Re: Adding 3 business days to "due date" (date/field picker)

     I figured it out. I needed to use that concat(substring-before(now(), "T"), "T17:00:00")

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.