Am connection to a DS which uses datetime type, I used customeSelectExpression to separate the date with time.
<DataSource ID="EPGDS" serverType="sql" dataSourceVersion="1" dbName="EPG" schema="data"
tableName="DATA" audit="false">
<fields>
<field name="SCHEDULE_ITEM_ID" primaryKey="true" required="true" />
<field name="PROGRAMME_NAME" type="text" length="100" required="true" editRequiresRole="EPG Coordinator"/>
<field name="EPG_TITLE" type="text" length="40"/>
<field name="US_EPISODE_NO" type="float"/>
<field name="EPISODE_NO" type="float"/>
<field name="PARENTAL_CODE" type="text" required="true" length="40" editRequiresRole="EPG Coordinator"/> <!--lookup EPG_PARENTAL_CODE -->
<field name="SERIES_NAME" type="text" length="50"/>
<field name="SERIES_YEAR" type="text" length="4" required="false" />
<field name="SCHEDULE_DATE_TIME" type="datetime" editRequiresRole="EPG Coordinator" />
<field name="DURATION" type="text" customSelectExpression ="to_char(to_date(DURATION,'sssss'),'hh24:mi:ss')"/>
<field name="CHANNEL_NAME" type="text" length="30"/>
<field name="EPG_GENRE" type="text" length="100" editRequiresRole="EPG Coordinator"/>
<field name="EPG_SUB_GENRE" type="text" length="100" editRequiresRole="EPG Coordinator"/>
<field name="SYNOPSIS" type="text" length="1000" editRequiresRole="EPG Coordinator"/>
<field name="LONG_DESCRIPTION" type="text" length="4000" editRequiresRole="EPG Coordinator"/>
<field name="LAST_MODIFIED_DATE" type="DATE"/>
<field name="START_TIME" type="time" customSelectExpression = "TO_DATE(TO_CHAR(SCHEDULE_DATE_TIME,'hh24:mi:ss'),'hh24:mi:ss')" editRequiresRole="EPG Coordinator"/>
<field name="END_TIME" type="time" customSelectExpression = "TO_DATE(to_char(SCHEDULE_DATE_TIME + DURATION/24/60/60,'hh24:mi:ss'),'hh24:mi:ss')" editRequiresRole="EPG Coordinator"/>
<field name="SERIES_NO" type="text" length="40" editRequiresRole="EPG Coordinator"/>
</fields>
<operationBindings>
<operationBinding operationType="fetch" operationID="fetchEPG">
<orderClause> SCHEDULE_DATE_TIME ASC</orderClause>
</whereClause> -->
</operationBinding>
</operationBindings>
</DataSource>
I also have a form which updates the DS, here is the js. I want to capture a new starttime on the form but it ignores it cause I used customSelectExpression and when I try use customUpdateExpression it does not display the
information on the client and it still does not take the input. please assist with this query.
isc.DynamicForm.create({
ID:"epgUpdateFrm", autoDraw:false,
dataSource:"EPGDS", //numCols:4,//height:200,
fields:[
{name:"CHANNEL_NAME",title:"Channel", width:"200",editorType: "staticText",canEdit:false},
{name:"PROGRAMME_NAME" ,type:"text",width:"200",emptyCellValue: "<font size='2' color='red'><strong>Click to edit</strong> </font>"},
//{name:"SCHEDULE_ITEM_ID" ,title:"Programme #",editorType:"staticText",width:"200", canEdit:false,canFilter:false,
// align:"left"},
{name:"PARENTAL_CODE" ,title:"Parental Code",required:true,type: "select", width:"200",align:"left",
optionDataSource:"ParentalCodesDS",pickListWidth:200, displayField:"PARENTAL_RATING",
valueField:"DVBCODE"},
//{name:"SERIES_YEAR", width:"200",align:"left",editorType:"staticText", required:false,canEdit:false},
{name:"SERIES_NO" ,title:"Series #",type:"number", width:"200",emptyCellValue: "Unknown"},
{name:"EPISODE_NO", editorType:"staticText",width:"200",align:"left",canEdit:false},
{name:"EPG_GENRE" ,type:"select", width:"200",title:"EPG Genre",required:true,
optionDataSource:"GenreDS",displayField:"DESCRIPTION", valueField:"GENRE_CODE"},
{name:"EPG_SUB_GENRE" ,type:"select", width:"200",title:"EPG Sub Genre",required:true,
optionDataSource:"SubGenreDS",valueField:"DESCRIPTION", displayField:"DESCRIPTION"},
{name:"SCHEDULE_DATE_TIME",title:"Schedule Date",editorType:"staticText",canFilter:false, format: "dd-MM-yyyy", width:"160", align:"left",visible:false, canEdit:false},
{name:"START_TIME",title:"Start Time",type:"time", width:"80",align:"left",canSave:true,canEdit:true,canFilter:false},
{name:"END_TIME",title:"End Time",type:"time", width:"80",align:"left",canEdit:true,canFilter:false},
{name:"DURATION", type:"text", width:"100",canSave:true,canEdit:true,align:"left",canFilter:false},
{name:"SYNOPSIS" ,type:"textItem" ,width:"300",canEdit:true},
{name:"LONG_DESCRIPTION" ,type:"text", width:"300",canEdit:true}
],
wrapItemTitles:false
});
isc.Button.create({ ID:"v_saveEpg", autoDraw:false,title:"Save",
icon:Page.getAppImgDir()+ "/generalicons/save.png",
click:function(){
isc.RPCManager.startQueue();
epgUpdateFrm.saveData();
isc.RPCManager.sendQueue();
}
});
isc.Button.create({ ID:"v_refreshEpg", autoDraw:false,title:"Refresh",
icon:Page.getAppImgDir()+ "/generalicons/refresh.png",
click:function(){
fetchEPGdata();
}
})
isc.HStack.create({ID:"v_epgUpdateButtonsStack",autoDraw:false,width:"100%",//height:30,
membersMargin:6,margin:6,
members:[v_saveEpg,v_refreshEpg],showEdges:false, edgeSize:2, showShadow:false
});
isc.VLayout.create({
ID:"epgUpdateVLayout",membersMargin:6,margin:6,
autoDraw:false,
members:[epgUpdateFrm,v_epgUpdateButtonsStack]
})
<DataSource ID="EPGDS" serverType="sql" dataSourceVersion="1" dbName="EPG" schema="data"
tableName="DATA" audit="false">
<fields>
<field name="SCHEDULE_ITEM_ID" primaryKey="true" required="true" />
<field name="PROGRAMME_NAME" type="text" length="100" required="true" editRequiresRole="EPG Coordinator"/>
<field name="EPG_TITLE" type="text" length="40"/>
<field name="US_EPISODE_NO" type="float"/>
<field name="EPISODE_NO" type="float"/>
<field name="PARENTAL_CODE" type="text" required="true" length="40" editRequiresRole="EPG Coordinator"/> <!--lookup EPG_PARENTAL_CODE -->
<field name="SERIES_NAME" type="text" length="50"/>
<field name="SERIES_YEAR" type="text" length="4" required="false" />
<field name="SCHEDULE_DATE_TIME" type="datetime" editRequiresRole="EPG Coordinator" />
<field name="DURATION" type="text" customSelectExpression ="to_char(to_date(DURATION,'sssss'),'hh24:mi:ss')"/>
<field name="CHANNEL_NAME" type="text" length="30"/>
<field name="EPG_GENRE" type="text" length="100" editRequiresRole="EPG Coordinator"/>
<field name="EPG_SUB_GENRE" type="text" length="100" editRequiresRole="EPG Coordinator"/>
<field name="SYNOPSIS" type="text" length="1000" editRequiresRole="EPG Coordinator"/>
<field name="LONG_DESCRIPTION" type="text" length="4000" editRequiresRole="EPG Coordinator"/>
<field name="LAST_MODIFIED_DATE" type="DATE"/>
<field name="START_TIME" type="time" customSelectExpression = "TO_DATE(TO_CHAR(SCHEDULE_DATE_TIME,'hh24:mi:ss'),'hh24:mi:ss')" editRequiresRole="EPG Coordinator"/>
<field name="END_TIME" type="time" customSelectExpression = "TO_DATE(to_char(SCHEDULE_DATE_TIME + DURATION/24/60/60,'hh24:mi:ss'),'hh24:mi:ss')" editRequiresRole="EPG Coordinator"/>
<field name="SERIES_NO" type="text" length="40" editRequiresRole="EPG Coordinator"/>
</fields>
<operationBindings>
<operationBinding operationType="fetch" operationID="fetchEPG">
<orderClause> SCHEDULE_DATE_TIME ASC</orderClause>
</whereClause> -->
</operationBinding>
</operationBindings>
</DataSource>
I also have a form which updates the DS, here is the js. I want to capture a new starttime on the form but it ignores it cause I used customSelectExpression and when I try use customUpdateExpression it does not display the
information on the client and it still does not take the input. please assist with this query.
isc.DynamicForm.create({
ID:"epgUpdateFrm", autoDraw:false,
dataSource:"EPGDS", //numCols:4,//height:200,
fields:[
{name:"CHANNEL_NAME",title:"Channel", width:"200",editorType: "staticText",canEdit:false},
{name:"PROGRAMME_NAME" ,type:"text",width:"200",emptyCellValue: "<font size='2' color='red'><strong>Click to edit</strong> </font>"},
//{name:"SCHEDULE_ITEM_ID" ,title:"Programme #",editorType:"staticText",width:"200", canEdit:false,canFilter:false,
// align:"left"},
{name:"PARENTAL_CODE" ,title:"Parental Code",required:true,type: "select", width:"200",align:"left",
optionDataSource:"ParentalCodesDS",pickListWidth:200, displayField:"PARENTAL_RATING",
valueField:"DVBCODE"},
//{name:"SERIES_YEAR", width:"200",align:"left",editorType:"staticText", required:false,canEdit:false},
{name:"SERIES_NO" ,title:"Series #",type:"number", width:"200",emptyCellValue: "Unknown"},
{name:"EPISODE_NO", editorType:"staticText",width:"200",align:"left",canEdit:false},
{name:"EPG_GENRE" ,type:"select", width:"200",title:"EPG Genre",required:true,
optionDataSource:"GenreDS",displayField:"DESCRIPTION", valueField:"GENRE_CODE"},
{name:"EPG_SUB_GENRE" ,type:"select", width:"200",title:"EPG Sub Genre",required:true,
optionDataSource:"SubGenreDS",valueField:"DESCRIPTION", displayField:"DESCRIPTION"},
{name:"SCHEDULE_DATE_TIME",title:"Schedule Date",editorType:"staticText",canFilter:false, format: "dd-MM-yyyy", width:"160", align:"left",visible:false, canEdit:false},
{name:"START_TIME",title:"Start Time",type:"time", width:"80",align:"left",canSave:true,canEdit:true,canFilter:false},
{name:"END_TIME",title:"End Time",type:"time", width:"80",align:"left",canEdit:true,canFilter:false},
{name:"DURATION", type:"text", width:"100",canSave:true,canEdit:true,align:"left",canFilter:false},
{name:"SYNOPSIS" ,type:"textItem" ,width:"300",canEdit:true},
{name:"LONG_DESCRIPTION" ,type:"text", width:"300",canEdit:true}
],
wrapItemTitles:false
});
isc.Button.create({ ID:"v_saveEpg", autoDraw:false,title:"Save",
icon:Page.getAppImgDir()+ "/generalicons/save.png",
click:function(){
isc.RPCManager.startQueue();
epgUpdateFrm.saveData();
isc.RPCManager.sendQueue();
}
});
isc.Button.create({ ID:"v_refreshEpg", autoDraw:false,title:"Refresh",
icon:Page.getAppImgDir()+ "/generalicons/refresh.png",
click:function(){
fetchEPGdata();
}
})
isc.HStack.create({ID:"v_epgUpdateButtonsStack",autoDraw:false,width:"100%",//height:30,
membersMargin:6,margin:6,
members:[v_saveEpg,v_refreshEpg],showEdges:false, edgeSize:2, showShadow:false
});
isc.VLayout.create({
ID:"epgUpdateVLayout",membersMargin:6,margin:6,
autoDraw:false,
members:[epgUpdateFrm,v_epgUpdateButtonsStack]
})
Comment