Examples: Explorer_Check_Stop_Processing


The following example is the procedure from the sample integrating application that adds Leads records to the SmartList. Notice that the procedure uses the Explorer_Check_Stop_Processing procedure to know whether to continue adding items to the SmartList.

in integer IN_Total_SubItems;
in Explorer_BOOL_List IN_Searching;
in Explorer_Resource_List IN_Dict_List;
in Explorer_Resource_List IN_Field_List;
in Explorer_INT_List IN_Field_Dict_ID;
in Explorer_INT_List IN_Field;
in Explorer_INT_List IN_Datatype;
in Explorer_INT_List IN_Type;
in Explorer_STR30_List IN_Search_From;
in Explorer_STR30_List IN_Search_To;
in Explorer_BOOL_List IN_Match_Case;
in integer IN_Global_Search_Type;
in Explorer_Field_Comparison IN_Field_Comparison;
in Explorer_Start_Comp_Field_ID IN_Start_Comp_Field_ID;
in Explorer_Start_Comp_Field_Dict IN_Start_Comp_Field_Dict;
in Explorer_End_Comp_Field_ID IN_End_Comp_Field_ID;
in Explorer_End_Comp_Field_Dict IN_End_Comp_Field_Dict;

inout long IO_Max_Records;

in boolean IN_GetSummary;
in integer IN_Summary_Type; {0 = Number of records, 1 = Total of Column}
inout integer IO_SummaryCount;
in integer IN_nSummaryFieldDictID;
in integer IN_nSummaryFieldID;
inout currency IO_ColumnTotal;

local boolean b_Stop, b_Found;
local long l_Record_Count;
local integer l_Key;

set l_Record_Count to 0;
set l_Key to 1;
call with name "Explorer_Check_Stop_Processing" in dictionary SMARTLIST, b_Stop;

{ Loop through table to get records }
get first table IG_Leads_MSTR by number l_Key;
while(err() <> EOF) and (l_Record_Count < IO_Max_Records) and (not b_Stop) do

	{Set the global SmartList Master ID}
	SmartList_Master_ID of globals = 'Lead ID' of table IG_Leads_MSTR;

	call with name "Explorer_Search_Generic" in dictionary SMARTLIST,
		IG_PROD_ID,
		SMARTLIST_OBJECTTYPE_LEADS,
		IN_Searching,
		IN_Field_Dict_ID,
		IN_Field,
		IN_Datatype,
		IN_Type,
		IN_Search_From,
		IN_Search_To,
		IN_Match_Case,
		IN_Global_Search_Type,

		IN_Field_Comparison, 
		IN_Start_Comp_Field_ID, 
		IN_Start_Comp_Field_Dict,
		IN_End_Comp_Field_ID,
		IN_End_Comp_Field_Dict,
	
		b_Found;

	if b_Found then
		increment l_Record_Count;
		call foreground SmartList_Leads_FillOneRowAtTime,
			IN_Total_SubItems,
			IN_Dict_List,
			IN_Field_List,
			l_Record_Count,
			table IG_Leads_MSTR;
	end if;

	get next table IG_Leads_MSTR by number l_Key;
	call with name "Explorer_Check_Stop_Processing" in dictionary SMARTLIST, b_Stop;
end while;


Documentation Feedback