How to pass value of parameter into include script for API call
Hi,
I have one report (Distribution Task Exception Task )where i have 5 filters- Date , islLocations , islLevel , islDistribution and Task on the top . For those filter i have created shared element for those( in separate file ) . Now my requirement is out of 5 , 1 filter(islTask ) is based on API and its method is POST , so we created a script to call API and to pass its payload .Condition is payload should be dynamic that means API will be refreshed based on the selection of other filters . But when i am trying to pass value to API , its not getting passed or refreshed
Please find code for Distribution Task Exception Report
<?xml version="1.0" encoding="utf-8"?>
<Report
ID="logi_DistributeTaskException"
>
<DefaultRequestParams
inpDueFrom="@Date.30DaysAgo~"
inpDueTo="@Date.Today~"
ReportName="logi_DistributeTaskException"
selectedLocation="@Session.LocationId~"
shwDetail="0"
/>
<MasterReport
Report="MasterReport"
/>
<LocalData>
<DataLayer
ConnectionID="SqlServerConnection"
ID="dlDistributionTaskException"
Source="SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
select
(Select top 1 value from translation_strings ts
where ts.translation_id = tp.title_translation_id and ts.locale_iso_code = tp.primary_language_iso_code
and ts.organization_id = 7003)
as task_title,
td.id as id,
l.name as location_name,
l.short_name as location_number,
pl.name as parent_location_name,
pl.short_name as parent_location_number,
resolution = CASE
WHEN td.resolution = 1 THEN 'Not Complete'
WHEN td.resolution = 2 THEN 'Complete'
WHEN td.resolution = 4 THEN 'N/A'
WHEN td.resolution = 8 THEN 'Not Complete'
END,
tp.start_date,
tp.end_date,
td.completion_date,
distribution_scope = CASE
WHEN tp.distribution_scope = 0 THEN 'location'
WHEN tp.distribution_scope = 1 THEN 'individual'
WHEN tp.distribution_scope = 2 THEN 'communications'
WHEN tp.distribution_scope = 3 THEN 'quicktask'
END,
r.name as role_name,
u.full_name as assigned_to_user,
u2.full_name as completed_by_user
from task_distr td
inner join task_predistr tp on tp.id = td.task_predistr_id
left join task_types tt on tt.id = tp.task_type_id
inner join locations l on l.id = td.location_id
left join locations pl on pl.id = l.parent_id
inner join roles r on r.id = tp.role_id
left join users u on u.id = td.assigned_user_id
left join users u2 on u2.id = td.completed_by
where
tp.organization_id = 7003 and td.is_deleted = 0 and tp.is_deleted = 0 and tp.id =270823"
Type="SQL"
>
<DataLayerLink
ID="dlDistributionTaskExceptionLink"
/>
</DataLayer>
</LocalData>
<LocalData
ID="LCReportHeader"
>
<DataLayer
ConnectionID="SqlServerConnection"
ID="dlReportHeader"
Source="select top 1 tp.start_date, tp.end_date, tp.id, ts.value as title
from task_predistr tp
inner join translation_strings ts on ts.translation_id = tp.title_translation_id and ts.locale_iso_code = tp.primary_language_iso_code
and (ts.is_deleted is null or ts.is_deleted = 0)
where tp.status = 8 and tp.id = 270823"
Type="SQL"
/>
</LocalData>
<Body>
<Division
Class="filter-section d-lg-flex"
Condition="'@Request.rdReportFormat~'=''"
HtmlDiv="True"
ID="filters"
ShowModes="rdBrowser"
>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
SharedElementID="SharedDates"
>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
/>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
/>
</IncludeSharedElement>
</IncludeSharedElement>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
SharedElementID="SharedLevel"
/>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
SharedElementID="SharedDistributionLevel"
/>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
SharedElementID="SharedSelectTasksTypeAhead"
>
<SharedElementParams
inpDueFrom="@Request.inpDueFrom~"
islDistributionLevel="@Request.islDistributionLevel~"
/>
</IncludeSharedElement>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
SharedElementID="SharedSubmit"
/>
</Division>
<LineBreak
LineCount="1"
/>
<Division
Class="report-section"
HtmlDiv="True"
ID="ReportHeader"
>
<Division
HtmlDiv="True"
>
<ResponsiveRow>
<ResponsiveColumn>
<Label
Caption="Task Title"
Class="ThemeHeader"
/>
</ResponsiveColumn>
<ResponsiveColumn>
<Label
Caption="@Local.LCReportHeader.title~"
Class="ThemeHeader"
/>
</ResponsiveColumn>
<ResponsiveColumn/>
</ResponsiveRow>
<ResponsiveRow>
<ResponsiveColumn>
<Label
Caption="@Local.common_startdate~"
Class="ThemeHeader"
/>
</ResponsiveColumn>
<ResponsiveColumn>
<Label
Caption="@Local.LCReportHeader.start_date~"
Class="ThemeHeader"
/>
</ResponsiveColumn>
<ResponsiveColumn/>
</ResponsiveRow>
<ResponsiveRow>
<ResponsiveColumn>
<Label
Caption="@Local.common_duedate~"
Class="ThemeHeader"
/>
</ResponsiveColumn>
<ResponsiveColumn>
<Label
Caption="@Local.LCReportHeader.end_date~"
Class="ThemeHeader"
/>
</ResponsiveColumn>
<ResponsiveColumn/>
</ResponsiveRow>
</Division>
</Division>
<LineBreak
LineCount="1"
/>
<Division
Class="report-section"
HtmlDiv="True"
>
<Division
Class="card flex-fill"
HtmlDiv="True"
ID="dvMain"
>
<Division
HtmlDiv="True"
ID="dvBreadCrumb"
>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
SharedElementID="SharedMultiDrills"
>
<PassedSharedElement
ID="params"
>
<LinkParams
inpDueFrom=""
kendoFilter="1"
ReportName="logi_DistributeTaskException"
selectedLabel="@Request.selectedLabel~"
selectedLabelId="@Request.selectedLabelId~"
shwDetail="@Request.shwDetail~"
/>
</PassedSharedElement>
<SharedElementParams
DataTable="dtDistributeTaskException"
islTasks="@Request.islTasks~"
kendoFilter="1"
ReportName="logi_DistributeTaskException"
selectedLabel="@Request.selectedLabel~"
selectedLabelId="@Request.selectedLabelId~"
selectedlocationid="@Request.selectedlocationid~"
shwDetail="@Request.shwDetail~"
/>
</IncludeSharedElement>
</Division>
<Division
Class="card-body"
HtmlDiv="True"
ID="dvRefresh"
>
<Division
ID="divMainRefresh"
>
<Division
Condition="'@Data.rdHideTableRowCount-dtDistributeTaskException~'!='0'"
HtmlDiv="True"
ID="divForExport"
>
<IncludeSharedElement
DefinitionFile="_shrd.elements"
SharedElementID="SharedExports"
>
<PassedSharedElement
ID="params"
>
<LinkParams
inpDueFrom="@Request.inpDueFrom~"
inpDueTo="@Request.inpDueTo~"
islTasks="@Request.islTasks~"
selectedlocationid="@Request.selectedlocationid~"
shwDetail="@Request.shwDetail~"
/>
</PassedSharedElement>
<SharedElementParams
DataTable="dtDistributeTaskException"
selectedlocationid="@Request.selectedlocationid~"
/>
</IncludeSharedElement>
</Division>
<Division
HtmlDiv="True"
>
<Division
Class="divNoItems"
Condition="'@Data.rdHideTableRowCount-dtDistributeTaskException~'=='0'"
HtmlDiv="True"
ID="divForNoItems"
>
<Label
Caption="@Local.common_therearenoitems~"
Class="_191cul2 "
/>
</Division>
<Division
ID="divTable"
>
<ConditionalClass
Class="border table-responsive"
Condition="'@Data.rdHideTableRowCount-dtDistributeTaskException~'!='0'"
/>
<LineBreak
LineCount="2"
/>
<ResponsiveRow>
<ResponsiveColumn>
<Label
Caption="Exceptions (Not Complete)"
Class="ThemeHeaderLarge,ThemeBold"
/>
</ResponsiveColumn>
</ResponsiveRow>
<LineBreak
LineCount="2"
/>
<ResponsiveRow>
<ResponsiveColumn>
<DataTable
AjaxPaging="False"
Class="table border-vertical mb-0 table-hover"
ColumnHeaderClass="text-right"
HideWhenZeroRows="True"
ID="dtDistributeTaskExceptionNotCompleted"
SortArrows="True"
>
<DataLayer
ID="dlDistributionTaskExceptionLinked"
LinkedDataLayerID="dlDistributionTaskExceptionLink"
Type="Linked"
>
<ConditionFilter
Condition=""@Data.resolution~"=="Not Complete""
/>
</DataLayer>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="@Local.common_id~"
ID="id"
>
<Label
Caption="@Data.id~"
HtmlTag="span"
ID="lblid"
/>
<DataColumnSort
DataColumn="@Data.id~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="@Local.common_location~"
ID="location"
>
<Label
Caption="@Data.location_name~"
HtmlTag="span"
ID="lbllocation"
/>
<DataColumnSort
DataColumn="@Data.location_name~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="Location #"
ID="locationNumber"
>
<Label
Caption="@Data.location_number~"
HtmlTag="span"
ID="lbllocationNo"
/>
<DataColumnSort
DataColumn="@Data.location_number~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="@Local.common_parentlocation~"
ID="Parentlocation"
>
<Label
Caption="@Data.parent_location_name~"
HtmlTag="span"
ID="lblParentlocation"
/>
<DataColumnSort
DataColumn="@Data.parent_location_name~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="Parent Location #"
ID="ParentlocationNumber"
>
<Label
Caption="@Data.parent_location_number~"
HtmlTag="span"
ID="lblParentlocationNo"
/>
<DataColumnSort
DataColumn="@Data.parent_location_number~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="@Local.common_resolution~"
ID="resolution"
>
<Label
Caption="@Data.resolution~"
HtmlTag="span"
ID="lblResolution"
/>
<DataColumnSort
DataColumn="resolution"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="Assigned to User"
ID="assigned_to_user"
>
<Label
Caption="@Data.assigned_to_user~"
HtmlTag="span"
ID="lblAssignedtoUser"
/>
<DataColumnSort
DataColumn="@Data.assigned_to_user~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
</DataTable>
</ResponsiveColumn>
</ResponsiveRow>
<LineBreak
LineCount="2"
/>
<ResponsiveRow>
<ResponsiveColumn>
<Label
Caption="Completed Tasks"
Class="ThemeHeaderLarge,ThemeBold"
/>
</ResponsiveColumn>
</ResponsiveRow>
<LineBreak
LineCount="2"
/>
<ResponsiveRow>
<ResponsiveColumn>
<DataTable
AjaxPaging="False"
Class="table border-vertical mb-0 table-hover"
ColumnHeaderClass="text-right"
HideWhenZeroRows="True"
ID="dtDistributeTaskExceptionCompletedTask"
SortArrows="True"
>
<DataLayer
ID="dlDistributionTaskExceptionLinked"
LinkedDataLayerID="dlDistributionTaskExceptionLink"
Type="Linked"
>
<ConditionFilter
Condition=""@Data.resolution~"!="Not Complete""
/>
</DataLayer>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="@Local.common_id~"
ID="id"
>
<Label
Caption="@Data.id~"
HtmlTag="span"
ID="lblid"
/>
<DataColumnSort
DataColumn="@Data.id~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="@Local.common_location~"
ID="location"
>
<Label
Caption="@Data.location_name~"
HtmlTag="span"
ID="lbllocation"
/>
<DataColumnSort
DataColumn="@Data.location_name~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="Location #"
ID="locationNumber"
>
<Label
Caption="@Data.location_number~"
HtmlTag="span"
ID="lbllocationNo"
/>
<DataColumnSort
DataColumn="@Data.location_number~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="@Local.common_parentlocation~"
ID="Parentlocation"
>
<Label
Caption="@Data.parent_location_name~"
HtmlTag="span"
ID="lblParentlocation"
/>
<DataColumnSort
DataColumn="@Data.parent_location_name~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="Parent Location #"
ID="ParentlocationNumber"
>
<Label
Caption="@Data.parent_location_number~"
HtmlTag="span"
ID="lblParentlocationNo"
/>
<DataColumnSort
DataColumn="@Data.parent_location_number~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="@Local.common_resolution~"
ID="resolution"
>
<Label
Caption="@Data.resolution~"
HtmlTag="span"
ID="lblResolution"
/>
<DataColumnSort
DataColumn="resolution"
/>
<ExcelColumnFormat/>
</DataTableColumn>
<DataTableColumn
ColumnHeaderClass="text-left rdThemeDataTableHeader"
Header="Assigned to User"
ID="assigned_to_user"
>
<Label
Caption="@Data.assigned_to_user~"
HtmlTag="span"
ID="lblAssignedtoUser"
/>
<DataColumnSort
DataColumn="@Data.assigned_to_user~"
/>
<ExcelColumnFormat/>
</DataTableColumn>
</DataTable>
</ResponsiveColumn>
</ResponsiveRow>
</Division>
</Division>
</Division>
</Division>
</Division>
</Division>
</Body>
<ideTestParams
inpDueFrom=""
inpDueTo=""
islDistributionLevel=""
islTasks=""
rdReportFormat=""
selectedLabel=""
selectedLabelId=""
selectedlocationid=""
shwDetail=""
/>
</Report>
Please find a code for shared elements -
<SharedElement ID="SharedDates" IdeDisplayStatus="Collapsed">
<Division Class="col align-self-end mb-1" HtmlDiv="True">
<Division Condition="'@Request.rdReport~'=='logi_SpecificLocationandVisitTypeHistory'||'@Request.rdReport~'=='logi_UserTaskUsageReport'" IdeDisplayStatus="Collapsed">
<Label Caption="@Local.reports_completedfrom~" HtmlTag="strong" />
</Division>
<Division Condition="'@Request.rdReport~'!='logi_SpecificLocationandVisitTypeHistory'&&'@Request.rdReport~'!='logi_UserTaskUsageReport'" IdeDisplayStatus="Collapsed">
<Label Caption="@Local.reports_duefrom~" HtmlTag="strong" />
</Division>
<Division Condition="'@Request.rdReport~'=='logi_Feedback'" HtmlDiv="True" ID="DateTimeTo">
<InputText Class="form-control " DefaultValue="@Request.inpDueFrom~" ID="inpDueFrom" IdeDisplayStatus="Collapsed">
<EventHandler DhtmlEvent="onChange" IdeDisplayStatus="Collapsed">
<Action ElementID="InitDateTimePickerEnd,unique" PostRefreshJavascript=" $(document).ready(function() {
 
 
 // create MultiSelect from select HTML element
 var required = $("#islCategory").kendoMultiSelect({
 filter: "contains",
 value: [ "ALL" ],
 select: function(e) {
 var dataItem = this.dataSource.view()[e.item.index()];
 var values = this.value();
 
 if (dataItem.value === "ALL") {
 this.value(values.includes("ALL") ? "ALL" : "");
 } else if (values.indexOf("ALL") !== -1) {
 values = $.grep(values, function(value) {
 return value !== "ALL";
 });
 this.value(values.length === this.dataSource.view().length -1 ? "" : values);
 }
 }
 }).data("kendoMultiSelect");
 });
 
 
 
 " RequestForwarding="True" Type="RefreshElement" IdeDisplayStatus="Collapsed">
<WaitPage />
</Action>
</EventHandler>
</InputText>
<Image Caption="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" Class="ThemeHidden" ID="InitDateTimePicker">
<EventHandler DhtmlEvent="onLoad">
<Action Javascript="var startDate='@Request.inpDueFrom~';


$('#inpDueFrom').daterangepicker({
 singleDatePicker: true,
 showDropdowns: true,
 maxDate: new Date(),
 locale: {
 format: 'YYYY-MM-DD'
 }
}, function(start, end, label) {
 console.log(start, end, label);
javascript:rdAjaxRequestWithFormVars('rdAjaxCommand=RefreshElement&rdRefreshElementID=DateTimeEnd&islTasks&rdReport=@Request.rdReport~','false','',true,null,null,['Please Wait', 'rdThemeWaitPanel', 'rdThemeWaitCaption'],true)
});

" Type="Javascript" />
</EventHandler>
</Image>
</Division>
<Division Condition="'@Request.rdReport~'!='logi_Feedback'" HtmlDiv="True" ID="DateTimeTo">
<InputText Class="form-control " DefaultValue="@Request.inpDueFrom~" ID="inpDueFrom" IdeDisplayStatus="Collapsed">
<EventHandler DhtmlEvent="onChange" IdeDisplayStatus="Collapsed">
<Action ElementID="InitDateTimePickerEnd" RequestForwarding="True" Type="RefreshElement" IdeDisplayStatus="Collapsed">
<WaitPage />
</Action>
</EventHandler>
</InputText>
<Image Caption="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" Class="ThemeHidden" ID="InitDateTimePicker">
<EventHandler DhtmlEvent="onLoad">
<Action Javascript="var startDate='@Request.inpDueFrom~';


$('#inpDueFrom').daterangepicker({
 singleDatePicker: true,
 showDropdowns: true,
 maxDate: new Date(),
 locale: {
 format: 'YYYY-MM-DD'
 }
}, function(start, end, label) {
 console.log(start, end, label);
javascript:rdAjaxRequestWithFormVars('rdAjaxCommand=RefreshElement&rdRefreshElementID=DateTimeEnd&islTasks&rdReport=@Request.rdReport~','false','',true,null,null,['Please Wait', 'rdThemeWaitPanel', 'rdThemeWaitCaption'],true)
});

" Type="Javascript" />
</EventHandler>
</Image>
</Division>
</Division>
<Division Class="col align-self-end mb-1" HtmlDiv="True">
<Division Condition="'@Request.rdReport~'=='logi_SpecificLocationandVisitTypeHistory'||'@Request.rdReport~'=='logi_UserTaskUsageReport'" IdeDisplayStatus="Collapsed">
<Label Caption="@Local.reports_completedto~" HtmlTag="strong" />
</Division>
<Division Condition="'@Request.rdReport~'!='logi_SpecificLocationandVisitTypeHistory'&&'@Request.rdReport~'!='logi_UserTaskUsageReport'" IdeDisplayStatus="Collapsed">
<Label Caption="@Local.reports_dueto~" HtmlTag="strong" />
</Division>
<Division Condition="'@Request.rdReport~'=='logi_Feedback'" HtmlDiv="True" ID="DateTimeEnd" IdeDisplayStatus="Collapsed">
<InputText Class="form-control" DefaultValue="@Request.inpDueTo~" ID="inpDueTo" IdeDisplayStatus="Collapsed">
<EventHandler DhtmlEvent="onChange" IdeDisplayStatus="Collapsed">
<Action ElementID="unique" PostRefreshJavascript=" $(document).ready(function() {
 
 
 // create MultiSelect from select HTML element
 var required = $("#islCategory").kendoMultiSelect({
 filter: "contains",
 value: [ "ALL" ],
 select: function(e) {
 var dataItem = this.dataSource.view()[e.item.index()];
 var values = this.value();
 
 if (dataItem.value === "ALL") {
 this.value(values.includes("ALL") ? "ALL" : "");
 } else if (values.indexOf("ALL") !== -1) {
 values = $.grep(values, function(value) {
 return value !== "ALL";
 });
 this.value(values.length === this.dataSource.view().length -1 ? "" : values);
 }
 }
 }).data("kendoMultiSelect");
 });
 
 
 
 " RequestForwarding="True" Type="RefreshElement" IdeDisplayStatus="Collapsed">
<LinkParams islCategory="@Request.islCategory~" />
<WaitPage />
</Action>
</EventHandler>
</InputText>
<Image Caption="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" Class="ThemeHidden" ID="InitDateTimePickerEnd" IdeDisplayStatus="Collapsed">
<EventHandler DhtmlEvent="onload" IdeDisplayStatus="Collapsed">
<Action Class="abc" Javascript="var startdate='@Request.inpDueFrom~';

$('#inpDueTo').daterangepicker({
 singleDatePicker: true,
 showDropdowns: true,
 maxDate: new Date(),
 minDate:startdate,
 locale: {
 format: 'YYYY-MM-DD'
 }
}, function(start, end, label) {
 console.log(start, end, label);
javascript:rdAjaxRequestWithFormVars('rdAjaxCommand=RefreshElement&rdRefreshElementID=fltTasks&rdReport=@Request.rdReport~','false','',true,null,null,['Please Wait', 'rdThemeWaitPanel', 'rdThemeWaitCaption'],true)
});

" Type="Javascript" />
</EventHandler>
</Image>
</Division>
<Division Condition="'@Request.rdReport~'!='logi_Feedback'" HtmlDiv="True" ID="DateTimeEnd">
<InputText Class="form-control" DefaultValue="@Request.inpDueTo~" ID="inpDueTo" />
<Image Caption="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" Class="ThemeHidden" ID="InitDateTimePickerEnd">
<EventHandler DhtmlEvent="onload">
<Action Class="abc" Javascript="var startdate='@Request.inpDueFrom~';

$('#inpDueTo').daterangepicker({
 singleDatePicker: true,
 showDropdowns: true,
 maxDate: new Date(),
 minDate:startdate,
 locale: {
 format: 'YYYY-MM-DD'
 }
}, function(start, end, label) {
 console.log(start, end, label);
javascript:rdAjaxRequestWithFormVars('rdAjaxCommand=RefreshElement&rdRefreshElementID=fltTasks&islTasks&rdReport=@Request.rdReport~','false','',true,null,null,['Please Wait', 'rdThemeWaitPanel', 'rdThemeWaitCaption'],true)
});

" Type="Javascript" />
</EventHandler>
</Image>
</Division>
</Division>
</SharedElement><SharedElement ID="SharedDistributionLevel" IdeDisplayStatus="Collapsed">
<Division Class="col align-self-end mb-1" HtmlDiv="True">
<Label Caption="@Local.common_distributionlevel~ " HtmlTag="strong" />
<InputHidden ID="CaptionDLevel" />
<InputSelectList Class="form-control min-filt" DefaultValue="@Session.LevelID~" ID="islDistributionLevel" ListCaptionsElementID="CaptionDLevel" OptionCaptionColumn="colName" OptionValueColumn="levelId">
<DataLayer ID="LinkedDlLocations" LinkedDataLayerID="lnkDlLocations" Type="Linked">
<DeDuplicateFilter DataColumns="levelId,levelDepth" />
<CalculatedColumn Formula="("@Data.name2~").replace(/(<([^>]+)>)/gi, "")" ID="colName" />
</DataLayer>
<EventHandler DhtmlEvent="onchange">
<Action ElementID="divMultiLocations,islTasks" PostRefreshJavascript=" $(document).ready(function() {
 
 
 // create MultiSelect from select HTML element
 var required = $("#islMultiLocations").kendoMultiSelect({
 filter: "contains",
 value: [ "ALL" ],
 select: function(e) {
 var dataItem = this.dataSource.view()[e.item.index()];
 var values = this.value();
 
 if (dataItem.value === "ALL") {
 this.value(values.includes("ALL") ? "ALL" : "");
 } else if (values.indexOf("ALL") !== -1) {
 values = $.grep(values, function(value) {
 return value !== "ALL";
 });
 this.value(values.length === this.dataSource.view().length -1 ? "" : values);
 }
 }
 }).data("kendoMultiSelect");
 });
 
 " RequestForwarding="True" Type="RefreshElement">
<WaitPage Caption="Please Wait" />
</Action>
</EventHandler>
</InputSelectList>
<IncludeScript IncludedScript="$(document).ready(function() {
 $('#islDistributionLevel').select2();
});" />
</Division>
</SharedElement><SharedElement ID="SharedLevel" IdeDisplayStatus="Collapsed">
<Division Class="col align-self-end mb-1" HtmlDiv="True">
<Label Caption="@Local.common_levels~" HtmlTag="strong" />
<InputHidden ID="CaptionLevel" />
<InputSelectList Class="form-control min-filt" DefaultValue="@Request.islLevel~" ID="islLevel" ListCaptionsElementID="CaptionLevel" OptionCaptionColumn="name" OptionValueColumn="id">
<DataLayer ID="LinkedDlLevels" LinkedDataLayerID="lnkDlLevels" Type="Linked" />
<EventHandler DhtmlEvent="onchange">
<Remark>
<Action ElementID="fltTasks" RequestForwarding="True" Type="RefreshElement">
<Action Javascript="$("#islTasks").prop("disabled", true).select2('close'); return true;
" Type="PreActionJavascript" />
</Action>
</Remark>
<Action Javascript="/* get index of selected item in Input Select List (ISL) */
var ndx = this.selectedIndex;
/* get the text in ISL of selected item */
var selText = this.options[ndx].text;
/* development only: popup to show us the text */
/*alert('Text: ' + selText);*/
/* stuff the selected text into an Input Hidden element */
document.getElementById('CaptionLevel').value = selText;
/* uncomment the following to also submit the page */
/* document.forms[0].action = 'http://localhost/myApp/rdPage.aspx?rdReport=nextDef'; */ 
/* document.forms[0].submit(); */
return true;" Type="Javascript">
<Action Javascript="$("#islTasks").prop("disabled", true).select2('close'); return true;
" Type="PreActionJavascript" />
</Action>
</EventHandler>
</InputSelectList>
<IncludeScript IncludedScript="$(document).ready(function() {
 $('#islLevel').select2();
});" />
</Division>
<Remark>
<SharedElementParams CaptionSharedLevel="@Request.CaptionLevel~" />
</Remark>
</SharedElement><SharedElement ID="SharedLocations" IdeDisplayStatus="Collapsed">
<Division Class="col align-self-end mb-1" HtmlDiv="True">
<Label Caption="@Local.common_locations~" HtmlTag="strong" />
<InputSelectList Class="form-control min-filt" DefaultValue="@Session.LocationId~" ID="islLocations" OptionCaptionColumn="name" OptionValueColumn="id">
<DataLayer ID="LinkedDlLocations" LinkedDataLayerID="lnkDlLocations" Type="Linked" />
<EventHandler DhtmlEvent="onchange">
<Action ElementID="fltTasks" Type="RefreshElement">
<Action Javascript="$("#islTasks").prop("disabled", true).select2('close'); return true;" Type="PreActionJavascript" />
</Action>
</EventHandler>
</InputSelectList>
<IncludeScript IncludedScript="$(document).ready(function() {
 $('#islLocations').select2();
});" />
</Division>
</SharedElement><SharedElement ID="SharedSelectTasksTypeAhead">
<Division Class="col align-self-end mb-1" HtmlDiv="True" ID="fltTasks">
<Label Caption="@Local.common_tasks~" HtmlTag="strong" />
<Remark>
<InputSelectList DefaultValue="@Request.islTasks~" ID="islTasks" IncludeBlank="True" IncludeBlankCaption="All Tasks" IncludeBlankValue="ALL" MultiSelect="True" OptionCaptionColumn="title" OptionValueColumn="objectId">
<DataLayer CacheKey="cachedTasks@Request.inpDueFrom~@Request.inpDueTo~@Request.islLocations~@Request.islCreatorLevel~@Request.islDistributionLevel~" ExpirationNow="@Constant.CacheExpireNow~" ExpirationTimeSpan="@Constant.CacheExpireTime~" ID="cachedTasks" Type="Cached">
<DataLayer AcceptType="application/json" ConnectionID="connDemo" HttpMethod="POST" ID="dlTasks" Type="REST" UrlPath="/searchapi/taskviews/tasklist" XPath="//results">
<HttpBody ContentType="application/json" HttpBodyContent="{"valueFilters":[{"field":"preDistLocationIds","values":[@SingleQuote.Request.islLocations~]},{"field":"distLocationIds","values":[]},{"field":"createdByLocationLevelId","values":[@SingleQuote.Request.islCreatorLevel~]},{"field":"taskLevelId","values":["@Request.islDistributionLevel~"]}],"rangeFilters":[{"greaterThanOrEqual":"@Request.inpDueFrom~","field":"startDate"},{"lessThanOrEqual":"@Request.inpDueTo~","field":"endDate"}],"sorts":[],"limit":50,"q":""}" />
</DataLayer>
</DataLayer>
</InputSelectList>
</Remark>
<HtmlTag HtmlTagName="select" ID="islTasks">
<HtmlAttributeParams name="islTasks" placeholder="Select One..." />
<IncludeScript IncludedScript="$(document).ready(function() {
 var islTasks2LastSearchTerm = "";
 $('#islTasks').select2({
 placeholder: "Select One...",
 minimumInputLength: 0,
 ajax: {
 delay: 350, // wait 250 milliseconds before triggering the request
 url: "https://"+'@Session.OrgUrl~'+"/searchapi/taskviews/tasklist",
 type: "post",
 data: function (params) {
 
 var searchTerm = params.term && params.term != "" ? params.term : islTasks2LastSearchTerm;
 var query = {
 q: searchTerm,
 valueFilters: [
 {
 "field": "preDistLocationIds",
 "values": [
 "1819"
 ]
 },
 {
 "field": "distLocationIds",
 "values": []
 },
 {
 "field": "createdByLocationLevelId",
 "values": []
 },
 {
 "field": "taskLevelId",
 "values": [
 "@Request.islDistributionLevel~"
 ]
 }
 ],
 rangeFilters: [
 {
 "greaterThanOrEqual": "@Request.inpDueFrom~",
 "field": "startDate"
 },
 {
 "lessThanOrEqual": "@Request.inpDueTo~",
 "field": "endDate"
 }
 ],
 limit: 50,
 sorts: []
 }
 islTasks2LastSearchTerm = searchTerm;
 // Query parameters will be ?search=[term]&type=public
 return JSON.stringify(query);
 },
 headers: {
 "content-type": "application/json", //If your header name has spaces or any other char not appropriate
 "Authorization": "Bearer @Session.AuthToken~" //for object property name, use quoted notation shown in second
 },
 dataType: 'json',
 success: function(data){
 },
 processResults: function (data) { 
 //console.log("results: "+data.results.length);
 var res = [];
 if(data && data.results){
 for(var i = 0 ; i < data.results.length; i++) {
 res.push({id: data.results[i].objectId, text: data.results[i].title});
 }
 }
 return {
 results: res
 }
 },
 complete: function(){
 }
 }
 });
});" />
</HtmlTag>
</Division>
</SharedElement>
I changed date and even Distribution Level filter but no new value is passed to this API .
Please find a screenshot below:
Please look into this . Its urgent .
Thanks ,
Simran
Please sign in to leave a comment.
Comments
0 comments