What is wrong with following event ajax call ffrom form on chanhe od date field

What is wrong with following event ajax call ffrom form on chanhe od date field ?

window.FormAPI.evaluateServerSideExpression(function(fn){
          window.FormAPI.setValue("number41",fn);
},"=calworkdays(FormAPI.getValue("date1").id, FormAPI.getValue("date2").id])");

OriginalPostID-23033

OriginalPostID-23033

  Discussion posts and replies are publicly visible

Parents
  • Notice how I'm building the string of the server-side expression (which is the second parameter) using the + operator so the statement FormAPI.getValue("date1").id is evaluated before being added to the string "=calworkdays...." and click "Add Watch" you will see the mistake I mentioned before; the string is being evaluated literally due to the syntax error. Here's a link where I explain more how to use IE Developer Tools, see my last entry from Jan 27 forum.appian.com/.../2692

    This type of syntax errors can be easily found using IE Developer Tools JS Debugger. If you place a debugger; statement in the change event you can step through each line of code and if you select the =
Reply
  • Notice how I'm building the string of the server-side expression (which is the second parameter) using the + operator so the statement FormAPI.getValue("date1").id is evaluated before being added to the string "=calworkdays...." and click "Add Watch" you will see the mistake I mentioned before; the string is being evaluated literally due to the syntax error. Here's a link where I explain more how to use IE Developer Tools, see my last entry from Jan 27 forum.appian.com/.../2692

    This type of syntax errors can be easily found using IE Developer Tools JS Debugger. If you place a debugger; statement in the change event you can step through each line of code and if you select the =
Children
No Data