SearchConfiguration Class Methods

In this section, the SearchConfiguration class methods are presented in alphabetical order.

Syntax

CollapseSearchCriteriaAfterSrch()

Description

Use the CollapseSearchCriteriaAfterSrch method to retrieve the Boolean value, which indicates whether to collapse search criteria or not after displaying the search results.

Parameters

None.

Returns

A Boolean value.

Example

&criteriaObj.CollapseSearchCriteriaAfterSrch();

Syntax

GetConfigSrchId()

Description

Use the GetConfigSrchId method to retrieve the configured search ID. The search ID is auto assigned in the PTS_SRCH_ASGN table.

The search ID is in this format: <PortalName>_<PortalObjName>.

Parameters

None.

Returns

A string value containing the search ID.

Example

&criteriaObj.GetConfigSrchId();

Syntax

GetConfiguredImageRecord()

Description

Use the GetConfiguredImageRecord method to retrieve the image record.

Parameters

None.

Returns

A string value containing the image record.

Example

&criteriaObj.GetConfiguredImageRecord();

Syntax

GetConfiguredImageRecordField()

Description

Use the GetConfiguredImageRecordField to retrieve the field for an image.

Parameters

None.

Returns

A string value containing the corresponding field for the image.

Example

&criteriaObj.GetConfiguredImageRecordField();

Syntax

GetConfiguredSearchType()

Description

Use the GetConfiguredSearchType method to retrieve the configured search type (standard or keyword).

Parameters

None.

Returns

A string value containing the search type.

Example

&criteriaObj.GetConfiguredSearchType();

Syntax

GetCriteriaFields(&display_option)

Description

Use the GetCriteriaFields method to retrieve the criteria fields selected for the search page (basic and advanced mode).

Parameters

Parameter

Description

&display_option

Specifies the search presentation mode. Valid values are:

  • "A" - represents advanced mode.

  • "B" - represents basic mode.

Returns

An array of PTS_CFGSRCH_CRITERIA:SearchField.

Example

The following code samples describe the use of the GetCriteriaFields method for basic and advanced modes.

/*Basic mode*/
import PTS_CFGSRCH_CRITERIA:SearchField;

Local array of PTS_CFGSRCH_CRITERIA:SearchField &CriteriaFieldsList = &criteriaObj.GetCriteriaFields("B");

If &CriteriaFieldsList <> Null Then
   For &i = 1 To &CriteriaFieldsList.Len
      &sField = &CriteriaFieldsList [&i];
      MessageBox(0, "", 0, 0, &sField.FieldName | "," | &sField.FieldLable | "," | &sField.FieldOrder | "," | &sField.RequiredFlag);
   End-For;
   
End-If;
/* Advanced mode */
import PTS_CFGSRCH_CRITERIA:SearchField;

Local array of PTS_CFGSRCH_CRITERIA:SearchField &CriteriaFieldsList = &criteriaObj.GetCriteriaFields("A");

If &CriteriaFieldsList <> Null Then
   
   For &i = 1 To &CriteriaFieldsList.Len
      &sField = &CriteriaFieldsList [&i];
      MessageBox(0, "", 0, 0, &sField.FieldName | "," | &sField.FieldLable | "," | &sField.FieldOrder | "," | &sField.RequiredFlag);
   End-For;
   
End-If;

Syntax

GetDefaultSrchLookup()

Description

Use the GetDefaultSrchLookup method to retrieve the default search lookup type (basic or advanced) specified for a content reference.

Parameters

None.

Returns

A string value containing the default search lookup type.

Example

&criteriaObj.GetDefaultSrchLookup();

Syntax

GetDefaultSrchLookupForSFF()

Description

Use the GetDefaultSrchLookupForSFF method to retrieve the default search lookup type (basic or advanced) specified for a content reference in small form factor devices.

Parameters

None.

Returns

A string value containing the default search lookup type.

Example

&criteriaObj.GetDefaultSrchLookupForSFF();

Syntax

GetESCriteriaFields()

Description

Use the GetESCriteriaFields method to retrieve the criteria fields selected for the keyword search page (advanced mode).

Parameters

None.

Returns

An array of PTS_CFGSRCH_CRITERIA:SearchField.

Example

&criteriaObj.GetESCriteriaFields();

Syntax

GetMaxSrchResults()

Description

Use the GetMaxSrchResults method to retrieve the maximum search results specified for a content reference.

Parameters

None.

Returns

An Integer value indicating the maximum search results.

Example

&criteriaObj.GetMaxSrchResults();

Syntax

GetPageLinksList()

Description

Use the GetPageLinksList method to retrieve the page links specified on the search page.

Parameters

None.

Returns

An array of PTS_CFGSRCH_CRITERIA:PageLink.

Example

&criteriaObj.GetPageLinksList();

Syntax

GetRecentSearchesCount()

Description

Use the GetRecentSearchesCount method to retrieve the number of recent searches stored in the system.

Parameters

None.

Returns

An Integer value.

Example

&criteriaObj.GetRecentSearchesCount();

Syntax

GetRecentSearchesNamingFormat()

Description

Use the GetRecentSearchesNamingFormat method to retrieve the naming format used for recent searches.

Parameters

None.

Returns

A string value containing the naming format for recent searches.

Example

&criteriaObj.GetRecentSearchesNamingFormat();

Syntax

GetResultFields()

Description

Use the GetResultFields method to retrieve the fields selected to display on the search results page.

Parameters

None.

Returns

An array of PTS_CFGSRCH_CRITERIA:ResultField.

Example

&criteriaObj.GetResultFields();

Syntax

GetSavedSearchesCount()

Description

Use the GetSavedSearchesCount method to retrieve the number of searches saved for a content reference.

Parameters

None.

Returns

An Integer value indicating the count of saved searches.

Example

&criteriaObj.GetSavedSearchesCount();

Syntax

GetSavedSearchesNamingFormat()

Description

Use the GetSavedSearchesNamingFormat method to retrieve the naming format used for saved searches.

Parameters

None.

Returns

A string value containing the naming format for saved searches.

Example

&criteriaObj.GetSavedSearchesNamingFormat();

Syntax

GetSearchCriteriaDisplayPattern()

Description

Use the GetSearchCriteriaDisplayPattern method to retrieve the display pattern of search criteria.

Parameters

None.

Returns

A string value containing the display pattern.

Example

&criteriaObj.GetSearchCriteriaDisplayPattern();

Syntax

GetSearchDefinition()

Description

Use the GetSearchDefinition method to retrieve the search definition specified for keyword search for a content reference.

Parameters

None.

Returns

A string value containing the search definition specified for keyword search.

Example

&criteriaObj.GetSearchDefinition();

Syntax

GetSearchPageInstructionsInfo()

Description

Use the GetSearchPageInstructionsInfo method to retrieve instructions to display on the search page.

Parameters

None.

Returns

A string value containing instructions to display on the search page.

Example

&criteriaObj.GetSearchPageInstructionsInfo();

Syntax

GetSearchPageTitleInfo()

Description

Use the GetSearchPageTitleInfo method to retrieve the specified title for a search page.

Parameters

None.

Returns

A string value containing the search page title.

Example

&criteriaObj.GetSearchPageTitleInfo();

Syntax

GetSearchRecord()

Description

Use the GetSearchRecord method to retrieve the search record specified for standard search on a content reference.

Parameters

None.

Returns

A string value containing the search record for a content reference.

Example

&criteriaObj.GetSearchRecord();

Syntax

GetSrchLookupType()

Description

Use the GetSrchLookupType method to retrieve the search lookup type (basic or advanced) specified for a content reference.

Parameters

None.

Returns

A string value containing the specified search lookup type.

Example

&criteriaObj.GetSrchLookupType();

Syntax

IsAutoSearchEnabled()

Description

Use the IsAutoSearchEnabled method to determine whether auto search is enabled for the content reference.

Parameters

None.

Returns

A Boolean value.

Example

&criteriaObj.IsAutoSearchEnabled();

Syntax

IsSearchPrimaryAction()

Description

Use the IsSearchPrimaryAction method to determine whether search is set as the primary action for the content reference.

Parameters

None.

Returns

A Boolean value.

Example

&criteriaObj.IsSearchPrimaryAction();

Syntax

SearchConfiguration()

Description

Use the SearchConfiguration method to instantiate an object of the SearchConfiguration class.

Parameters

None.

Returns

None.

Example

Local PTS_CFGSRCH_CRITERIA:SearchConfiguration &criteriaObj = create PTS_CFGSRCH_CRITERIA:SearchConfiguration();

Syntax

ShowRelatedActions()

Description

Use the ShowRelatedActions method to determine whether to show related actions on the search results page.

Parameters

None.

Returns

A Boolean value.

Example

&criteriaObj.ShowRelatedActions();