AnsweredAssumed Answered

SIS Snapshot Flatfile DI Custom Script Start Date

Question asked by PJacobs on Sep 28, 2017
Latest reply on Sep 28, 2017 by PJacobs


I am trying to use a custom script option in a SIS Snapshot Flatfile DI to set the start date value from information set from another field, i.e institution_name.


I have the code to get the desired date, but am running into a problem when I put it into a calendar object and then try to return it:


var s_year = data.getValue("institution_name").substring(0,4);

var s_month = data.getValue("institution_name").substring(4,6);

var s_day = data.getValue("institution_name").substring(6,8);

var s_date = new Date(s_month + "/" + s_day + "/" + s_year);



Calendar s_calendar = Calendar.getInstance();




When try and process this I am getting error:

Error in script execution for attribute: startDate.

blackboard.platform.script.ScriptingException: java.util.concurrent.ExecutionException: javax.script.ScriptException: org.mozilla.javascript.EvaluatorException: missing ; before statement (<Unknown Source>#1)


Any suggestions on how I should create and then pass the calendar back to Bb?


Thank you,