Best Practices

 View Only
  • 1.  Add 7 days to selected date

    Adopter
    Posted 03-17-2022 12:53
    I am working on a form. I have date field on the form which is auto populated to today's date. Form also have due date field which is 7 days after today's date. Instead of manually adding the due date by calculating (today + 7), is there any way to auto populate using some of question type?

    Thank you in advance for your time,
    Deepa

    ------------------------------
    Deepa Patil
    Product Owner
    PG&E
    ------------------------------


  • 2.  RE: Add 7 days to selected date
    Best Answer

    Posted 03-17-2022 15:59
    Hello Deepa,
    You can do this with 2 additional questions added to your form (and the initial Date/Time field).

    One thing to note is that the initial date/time will need to include the Time and can't just be date. You will need a Duration Picker, In the Properties tab, change the precision to Hours (from the default of Hours and Minutes), and then include a default value of 168 (for 168 hours or 7 days)


    Then you can use a Time-Based Math question, to add the duration to your initial date/time question.

    I hope this helps answer solve your problem!

    ------------------------------
    Ian Chamberlain
    Implementation Specialist
    ProntoForms
    ------------------------------



  • 3.  RE: Add 7 days to selected date

    Adopter
    Posted 03-17-2022 16:11
    Hi Ian! I was trying this earlier as well and couldn't figure out the right configuration, so thank you for posting the solution! I tried your steps and it worked perfectly. I hope it works for Deepa too! Another thing to remember is to hide the duration picker if you don't want to see it as a field.

    ------------------------------
    Lisa Zido
    Technical Systems Analyst
    GOJO Industries Inc.
    ------------------------------



  • 4.  RE: Add 7 days to selected date

    Posted 03-18-2022 09:49

    I am so happy to hear that this helped you out in your forms and very good call on hiding the questions, likely do not want your users seeing the math in the background. Thank you for pointing that out. 



    ------------------------------
    Ian Chamberlain
    Implementation Specialist
    ProntoForms
    ------------------------------



  • 5.  RE: Add 7 days to selected date

    Adopter
    Posted 03-18-2022 12:08
    Great! Thank you so much Ian for the solution. I tried it and worked for me like magic. I have follow up question.
    When you use "Duration Field" to increment days (inform of hours), is there any way to skip weekends?

    ------------------------------
    Deepa Patil
    Product Owner
    PG&E
    ------------------------------



  • 6.  RE: Add 7 days to selected date

    Posted 03-18-2022 15:50

    Hello Deepa, 

    Prontoforms does not have a concept of knowing what the day of the week is but we can accomplish what you are looking for with a little help from Excel. 

    Here is the theory behind it:

    1. Create a Manual Upload data source that will act as a sort of calendar, this data source will have 2 columns in it. Just some sample data below:

    Date Plus 7
    Monday, July 4, 2022 Wednesday, July 13, 2022
    Tuesday, July 5, 2022 Thursday, July 14, 2022
    Wednesday, July 6, 2022 Friday, July 15, 2022
    Thursday, July 7, 2022 Monday, July 18, 2022
    Friday, July 8, 2022 Tuesday, July 19, 2022
    Monday, July 11, 2022 Wednesday, July 20, 2022
    Tuesday, July 12, 2022 Thursday, July 21, 2022
    Wednesday, July 13, 2022 Friday, July 22, 2022
    Thursday, July 14, 2022 Monday, July 25, 2022
    Friday, July 15, 2022 Tuesday, July 26, 2022
    Monday, July 18, 2022 Wednesday, July 27, 2022


    The Date column will contain every day of the year minus weekends (I would include the dates for many many years to come) and then your second column will include the date + 7 business days (Excel can leverage the WORKDAY function: =WORKDAY(Date,7) to add 7 business days)

    Coming into Prontoforms now, you will keep your initial date question but instead of using Time-based math to figure out when 7 days later is, we will use the data source that was created. 

    You will need a dropdown that is pointing to your "Date" column in the data source and a conditional logic rule that will do the following. 

    IF InitialDate "is answered" Then Date Dropdown "is set to" InitialDate
    (something to note here, you might need to play around with the date formatting in your data source to match that coming from ProntoForms.

    Then you can set your dropdown question to "Push values to other questions" and push the Plus 7 value into your Due Date question.

    Let me know how that goes if you do go ahead with implementing it



    ------------------------------
    Ian Chamberlain
    Implementation Specialist
    ProntoForms
    ------------------------------



  • 7.  RE: Add 7 days to selected date

    Adopter
    Posted 03-23-2022 10:24
    Great! Thank you Ian.

    ------------------------------
    Deepa Patil
    Product Owner
    PG&E
    ------------------------------



Reminder: Content posted to our Community is public content.  Please be careful not to post Intellectual Property that you do not have permission to share.  For more information please refer to our Terms Of Use