//DATASOURCE with object Params: let dataSource = Fse.Data.newDataSource( { object : "WRK.tasks", objectParams : newConfig, objectParams : { "assignedTo" : Fse.Portal.appConfiguration.STP.userId } } ); //multiple { dataField : "bgId", label : { location : "left", text : "Buying Group" }, editorType : "dxDropDownBox", editorOptions : Fse.UI.multiSelectDropDownBoxEditorOptions( { dataSource : Fse.Data.newDataSource( { dataURL : instance.dataURL, object : "CDR.buyingGroups", keyField : "uniqueId" } ), searchExpr : "bgId", searchMode : "=", displayExpr : "bgName", multipleSelectedDisplay : "Multiple Buying Groups Selected", keyExpr : "uniqueId", title : "Select Buying Groups" }) }, //SINGLE DROP DOWN { dataField : "assignedTo", label : { location : "left", text : "Assigned To" }, editorType : "dxSelectBox", cssClass : widget.widgetOptions.config.assignedTo ? 'fx-active-preference' : null, editorOptions : { dataSource : Fse.Data.newDataSource( { dataURL : widget.dataURL, object : "FSPro.members", keyField : "fspro_userId" } ), searchExpr : "fullName", searchMode : "contains", displayExpr : "fullName", valueExpr : "fspro_userId", title : "Select Assignee", showClearButton : true, searchEnabled : true, } }, //FILTERS EXAMPLES let configForDataSource = $.extend( true, {}, widget.widgetOptions.config ); let dataSourceConfig = { object : "WRK.tasks", paginate : true, pageSize : 50, keyField : "taskId", objectParams : { userId : Fse.Portal.appConfiguration.STP.userId } } let dataSource = Fse.Data.newDataSource( dataSourceConfig ); let filter = [] if( configForDataSource.fspro_userId ) { filter = [ [ "userId", "=", configForDataSource.fspro_userId ], ]; } console.log('filter',filter ) if( filter.length ) { dataSource.filter( filter ); } dataSource.sort( { selector: "dueDate", desc: true } ); //Date Range Picker with Periods { dataField : "dueDate", label : { location : "left", text : "Due Date" }, editorType : "dxDropDownBox", editorOptions : Fse.UI.dateRangePickerOptions( { dateRangeOptions : { periodTypes : { "Y" : true, "M" : true, "Q" : true, "H" : true, "W" : true }, rangeRelationships : { "T" : true, "L" : true, "N" : false }, calendarTypes : { "F" : true, "N" : true }, includeCustom : true }, applyCustomDateRange : function( startDate, endDate ) { instance.dxForm.updateData( { dueDateStart : startDate, dueDateStart : endDate } ) } } ) },