I have a requirement in which according to the dropdown value selected, i need t

I have a requirement in which according to the dropdown value selected, i need to call the DB and set the respective details of the employee. I am able to retrive all the fields with the help of "evaluateServerSideExpression" except with DateOfBirth field

Here is the script that i am using in the change event of dropdown.

FormAPI.evaluateServerSideExpression(function(e){window.FormAPI.setValue("dob",e);}, "=rule!getEmployeeDOB("+FormAPI.getValue("dropdown18").id")");

getEmployeeDOB gives me the Date when i am testing the expression individually, but the date field in the form is not filled at all. It is returning some integer when i debugged with alert(e);

Please let me know if anybody have idea......

OriginalPostID-85336

OriginalPostID-85336

  Discussion posts and replies are publicly visible

  • Using FormAPI.setvalue we can't set the Value in date field. Instead You can use JQuery.
    A sample jQuery to set 'Date'/ 'Date Time' fields.
    $('#date_date_'+dateFieldID+'_valueDateSingle_fd_component_'+window.FormDesigner.runtimeNamespace+dateFieldID+'_').val(newDate);
    $('#date_date_'+dateFieldID+'_valueDateSingle_fd_component_'+window.FormDesigner.runtimeNamespace+dateFieldID+'_').trigger('change');
  • i am trying to set value as following

    $('#date_date_'+"datetime5"+'_valueDateSingle_fd_component_'+window.FormDesigner.runtimeNamespace+datetime5+'_').val("30/01/2014");$('#date_date_'+"datetime5"+'_valueDateSingle_fd_component_'+window.FormDesigner.runtimeNamespace+"datetime5"+'_').trigger('change');

    but it is throwing exception. can you please tell me where the error is ?