Autoselect of Weekdays!! - InfoPath Dev
in

InfoPath Dev

Autoselect of Weekdays!!

Last post 04-26-2013 03:18 AM by wilkies0106aw. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 04-23-2013 02:32 AM

    Autoselect of Weekdays!!

    Hi All,

     I have made a form & i have a change window only on 2 days Wednesday & Friday , so i was thinking if somebody fills the form on Monday then in next date & time field it automatically select the Wednesday & when form is filled on wednesday then it selects to Friday.Is there a way to do this?

     Currently i have configured the below formula where it just add 3 days to today date.

     concat(addDays(today(), 3), "T11:00:00")

  • 04-23-2013 06:51 AM In reply to

    Re: Autoselect of Weekdays!!

    Is your formula not working?
    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 04-24-2013 03:15 AM In reply to

    Re: Autoselect of Weekdays!!

    Its working but i want this by days..like our change window is on Wed & Friday only..so i want whenever the form is opened by someone The requested Install date field will be filled automaticall by days (Wed or Friday) like form is filled on Monday so once user submit that form it should automaticall come up with WED or Fiday.

     

    Is there any way to do that?

     

  • 04-24-2013 05:27 AM In reply to

    Re: Autoselect of Weekdays!!

    I see. You would most likely need to write some custom code to achieve this.

    You could also try qRules and the GetWeekDay command.

    Good luck!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 04-25-2013 08:52 AM In reply to

    Re: Autoselect of Weekdays!!

    Are these paid tools?

  • 04-25-2013 02:58 PM In reply to

    Re: Autoselect of Weekdays!!

     Yes, qRules has a free trial, but for long term use would require purchase. If you don't mind some maintenance, you could probably put together some kind of a calendar table in SQL or SharePoint you could leverage that to help you figure out the right date for a specific day of week w/out code...

    Hilary Stoupa

  • 04-26-2013 01:50 AM In reply to

    Re: Autoselect of Weekdays!!

    Dates and InfoPath are somewhat tricky. I couldn't figure this out natively within a form. - Various date formulas I've seen on the web are more like essays.

    If you're submitting this is a SharePoint library, why not use calculated columns? Then retrieve/change the required date on a subsequent form load?

    Columns: ReviewDate (Date initially selected on the form). - Submit form to library.

    Then in your list have the following:

    Calculated Column - NextWednesday - you could use an excel formula such as - =[ReviewDate]+7-WEEKDAY([ReviewDate],14)

    Calculated Column - NextFriday - =[ReviewDate]+7-WEEKDAY([ReviewDate],16)

    Calculated Column - NearestWednesdayOrFridayDate - =IF([ReviewDate]>[NextWednesday],[NextFriday],[NextWednesday])

    You'll want to play around with the formulas etc. i.e. "with the Nearest Wednesday or Friday Date" to suit your own requirements. If you pick a Friday as you're review date, do you want the nearest date to be that same Friday?

    You could also add some text to the form letting users know your change windows days etc.

  • 04-26-2013 02:46 AM In reply to

    Re: Autoselect of Weekdays!!

    Thanks All!!

    Could you please let me know how to make this calculated column is step by step...i will give a try to this..

    I have to date field in my form...1 is date that is set for today..and 2 is request Install date where i applied the formulla which shows today+3 days date when somebody opens the form...

     

     

  • 04-26-2013 03:18 AM In reply to

    Re: Autoselect of Weekdays!!

     Open up your SharePoint list/library>List Tools>List>List Settings

    Under Columns>Create Column.

    Select Calculated.

    Add Formula to suit your needs.

    Change data type to Date and Time

    I assume you already have a date column. So you'll just be creating a calculated column for TodayPlus3

    =[NameOfDateColumn]+3

    If you only need to add 3 days not Wed/Friday specific as asked for originally - you can easily add that to the form it self using something like the following addDays(TodayDate, 3)

     

    My previous formulas help with finding next Wed/Fri. -

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