To make it easier for the user to create SmartList search criteria, the items for list field columns are displayed in the Search window. For instance, the following illustration shows the choices displayed for the Qualified list column.
You will add the Explorer_Fill_Range_DDLs_From_Field_ID procedure to your application to retrieve the the values for the list columns you have added. This procedure must have the following parameters:
in integer IN_Object_DictID; in integer IN_Object_Type; in integer IN_FieldDictID; in integer IN_FieldID; inout anonymous field IO_From_DDL; inout anonymous field IO_To_DDL;
The IO_From_DDL and IO_To_DDL parameters contain references to the two drop-down lists that appear in the Search window. Your code must fill these drop-down lists with the values for the list field of the column the user selected. List fields must be window fields to have their static values read by sanScript code. You will need to place an instance of the list field on a hidden window so its static values can be accessed. A hidden window on a command form is a good place to add the hidden list field.
The following is the Explorer_Fill_Range_DDLs_From_Field_ID procedure for the sample integrating application. When the Qualified column is searched, it sets the static values for the drop-down lists that are displayed in the Search window. Notice that it references an instance of the Qualified Lead list field on a hidden window so that the static items can be retrieved.
Procedure name: Explorer_Fill_Range_DDLs_From_Field_ID
in integer IN_Object_DictID; in integer IN_Object_Type; in integer IN_FieldDictID; in integer IN_FieldID; inout anonymous field IO_From_DDL; inout anonymous field IO_To_DDL; local integer i; if IN_Object_DictID = IG_PROD_ID then if IN_Object_Type = SMARTLIST_OBJECTTYPE_LEADS then if IN_FieldID = resourceid(field 'Qualified Lead') then {Clear the drop-down lists before filling them} clear field IO_From_DDL; clear field IO_To_DDL; for i = 1 to countitems('Qualified Lead' of window Dummy of form Command_IG_Sample) do add item itemname('Qualified Lead' of window Dummy of form Command_IG_Sample, i) to field IO_From_DDL; add item itemname('Qualified Lead' of window Dummy of form Command_IG_Sample, i) to field IO_To_DDL; end for; end if; end if; end if;