Feature Request: Update DateTime field by adding a number value using the Conditions.

  • Profile Image
    Kane
    Asked on November 18, 2014 at 12:58 AM

    Hi,

     

    I'm trying to update the DateTime widget value using the Conditions Wizard

     

    Conditions > Update a form field value


    If [YearLevel] field [Is Equal To] [Reception]

    ([studentDob]-365)

    Output to Field [studentDob]

     

    I get an error on save 'If output is datetime field, source must also be'

    All Im trying to do is remove a year off the current student dob...

     

  • Profile Image
    jonathan
    Answered on November 18, 2014 at 06:28 AM

    Hi,

    I checked your jotform http://www.jotform.co/form/43127511669860 but I think there is a mistake in the calculation the reason it is not working.

     

    was there suppose to be another 'Date of Birth' field that will overwrite the 'Date of Birth' DateTime field?

    The condition and formula I see is that it is the same field that you are trying to update with same data from same field. Simply put, the source and the output of the formula seems to be referring to the same field only.

    To populate the DateTime field with a value, you need to have a source data or a field to do it.

    Something like this

     

    Here is the test jotform http://www.jotform.me/form/43212419940450

    Inform us if you need further assistance.

    Thanks. 

     

     

     

     

     

  • Profile Image
    ehps_sport
    Answered on November 20, 2014 at 01:33 AM

    Thanks - dont suppose you can get the current date somehow and do something like

     

    If [YearLevel] field [Is Equal To] [Reception]

    (sysdate-365)

    Output to Field [studentDob]

     

     

  • Profile Image
    Charlie
    Answered on November 20, 2014 at 10:22 AM

    Hi,

    Did you mean you would just like to add the current date or a specific date a year after and output it on a field?

    As you mentioned:

    (sysdate - 365) output to [studentDob]?

    If this is the case, unfortunately, the form builder doesn't have the function to update dates with by adding number values and output it as a date. Although, I did found a workaround, but not sure if this will suffice your need.

    1. 

    2.

    3.

    4.

    5. Choose the "Studend DOB Textbox" to where we want to output the result

    6. Here is the screenshot and the demo form that I made: http://form.jotformpro.com/form/43233493921959 

     

    I'm not sure if the workaround above works for you, but I hope this helps you or at least gives you an idea on how to proceed. The issue seems to be very simple but not in our condition function. I will escalate this feature request to our developers so that they can take a closer look and if they can implement it. You will receive a notification when an update has been been regarding this request.

    Thank you.