Search/Filter Panel The Search/Filter Panel allows you to define the panels for search, filter, and replace in the web part. The Search/Filter Panel contains the following elements: Table 10. Search/Filter Panel Element Description Searched Fields See Searched Fields. Expand Filter panel on Load Allows you to automatically open the Filter panel by default so that the user can perform a search quickly. When set to true, the Filter panel opens when the web part is loaded for the first time. Turn On List Searcher Mode Allows the user to perform a search before the listview display any data. Filter Criteria Usage Allow you to pass the filter criteria to the DAO provider layer. There are three options in this property: • PassToDAOProvider — The filter criteria is passed to the DAO Provider. When you select this, the filter criteria will not be used to filter the data that is returned by the external system (because the SI List View assumes that the data has been filtered by the external system). • FilterData — The filter criteria is used to filter the data that is returned by the external system. • PassToDAOProviderAndFilterData — The filter criteria is passed to the DAO Provider and is used to filter the data that is being returned by the external system. When you select PassToDAOProvider or PassToDAOProviderAndFilterData, you can use the filter criteria as parameter values in the operations in the Catalog property. In order to do so, you specify the parameter source as Input and the source name as: • FieldName.Value — allows you to retrieve the value that is entered by the user in the Filter panel for a specific field. • FieldName.MaxValue — allows you to retrieve the maximum value that is entered by the user in the Filter panel for the field that has Between operator, such as DateTime field. • FieldName.Operator - allows you to retrieve the operator that is specified by the user for a specific field. There is a possibility that your back-end only handles "Equals" operator. In that case, you can use the FixedOperator="Equals" attribute in the Searched Fields property so that the user can only use the Equals operator. Panel Button Location Determines the location of the Go, Reset and Close buttons in the Filter panel. This property also determines the location of the Go and Close buttons in the Replace panel. Show Filter On Fields Allows you to display a filter control on the listview column headers. When this element is set to true, the filter control appears next to each column header. However, you can only use this element when the Turn On list Searcher Mode element is set to False. NOTE: This filter does not support Add Field (Custom field that supports fixed and calculated values). Also, the maximum number of options available in the filter checklist will only be the first 500 items that are displayed in the List View. You can filter items beyond this 500 items limit directly using the search options provided in the filter control. Searched Fields This property defines which fields are displayed in the Filter panel. If defined, the web part will display Filter button in the toolbar. To disable the search feature, you can leave this property blank. If defined, the web part will display Filter or Search menu items under the Actions button in the toolbar. To disable the search feature, you can leave this property blank. You will be able to perform a search by pressing Enter. NOTE: Pressing Enter will not allow you to perform a search on such fields as external data, people picker, managed metadata, and a drop-down list. Instead, the default behavior will occur. You can further edit fields using the following elements: Table 11. Searched Fields Element Description Advanced Mode Turn on if you want to edit Searched Fields in XML format. This property is an XML string in the following format: <Fields> <Field Name="fieldName" [optional attributes]/> <!-- To search a cross site lookup field, use one of the following two formats --> <Field Name="fieldName" DisplayFieldName="fieldName" SortField="fieldName" [optional attributes]> <List SiteUrl="siteUrl" SiteName="siteName" ListName="listName"/> </Field> <Field Name="fieldName" DisplayFormat="fieldName" SortField="fieldName" [optional attributes]> <List SiteUrl="siteUrl" SiteName="siteName" ListName="listName"/> </Field></Fields> Name Indicates the element you are editing. Type Allows you to select a type of field. Title Displays title for the field. The value can be a plain string or an encoded HTML string. Default Value Defines the default value for the field. You can define a text, a number or a date. A date value must be specified in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ, for example: midnight of February 14, 2002 is 2002-02-14T00:00:00Z. Default Operator Defines the default operator for the field. Fixed Operator Defines the operator for the field. If specified, the drop-down menu to select the operator for this field is turned off. Column Count Defines the number of columns for the options in a multi-choice field or in a choice-and-lookup field if the Enable Multi Choice attribute is set to True. This is useful in case your choice or lookup fields have too many choices and you want to break the choices into several columns to minimize the vertical scrolling in your form. Date Time Format Available if you select DateTime as a type. Enable Multi Choice Available if you select Choice as a type. Allows you to select multiple options for the choice-and-lookup field. Therefore, the user can specify a condition like "A or B". This attribute is ignored by other field types. To search a cross-site lookup field, you must specify one or more List elements inside the Field element. The cross-site lookup field is displayed as two drop downs. Choice Population Type Allows you to define how you want to define the options in your Choice field. It is a drop-down list with the following options: Manually or Using Operation in the Catalog. For more information, see the below paragraphs. If you select Choice as the field type, you can define the options in your choice field. You can hardcode the options directly under the Field element. Select the ChoicePopulationType of ‘Manually’ to do this. Here is an example: <Field Name="EmployeeStatus" Type="Choice"> <Option Text="Active" Value="1" /> <Option Text="Retired" Value="2" /> </Field> If the Value attribute is not specified, the Text is used as the value. You can specify an action that will retrieve the options from your external system. Select the ChoicePopulationType of ‘Using Operation in the Catalog’ to do this. The syntax is: <Field Name="fieldName" Type="Choice"> <Lookup Operation="EntityName.OperationName" DataMember="tableName" DataTextField="textFieldName" DataValueField="valueFieldName" /> </Field> -OR- <Field Name="fieldName" Type="Choice"> <Lookup Operation="EntityName.OperationName" DataIndex="index" DataTextField="textFieldName" DataValueField="valueFieldName" /> </Field> • The Operation defines the operation that is used to retrieve the options from the external system. The syntax for the operation is EntityName.OperationName. Both the entity and the operation must already be defined in the Catalog property. • The DataMember defines the data table name that contains the options in case the operation returns multiple tables. If external system returns multiple data tables without name, you can use the DataIndex attribute to refer to the table. The index is a number and it starts with 0 (not 1). • The DataTextField defines the column in the data table whose value is displayed in the drop-down menu. • The DataValueField defines the column in the data table that contains the real value that should be saved back to the external system.