Collection Considerations

Collections created from a search include a URL that identifies the search criteria. However, unlike other URLs in STEP, a collection URL does not include settings like workspace or context.

To illustrate:

  • The URL for an object in the primary product hierarchy includes Context1 and workspace Main: step://product?editor=Product&versionid=204372&contextid=Context1&id=235113&workspaceid=Main

  • The URL for a search on a list of three IDs (18212, 18213, and 18216) but not the context or workspace: step://search?args0.0=searchString%3d18212%0a18213%0a18216%2cuniqueKey%3dIDKey&search0.0=IDListCriteria

  • The URL for a search on objects with a value of 'blue' for the COLOR attribute but not the context or workspace: step://search?args0.0=IncludeDataContainers%3dno%2csearchString%3dCOLOR%c2%a0%28COLOR%29+%253D+blue%2cRegExp%3dno%2cMatchCase%3dno%2cIncludeInheritedValues%3dno%2cRecycleBinOnly%3dno&search0.0=ValueCriteria

Essentially, a collection created by a search operates as a saved search. The absence of the context and workspace data in the 'Search URL' parameter allows the search to be rerun and a collection to be refreshed on a different context / workspace. This also allows the results from a search collection to differ based on the current settings. Understanding this flexibility can explain why results vary. Settings that can cause different search results include, but are not limited to, workspace, context, dimension points, and privileges.

Important: The content of a collection created from a search displays the search results from the last time the search was refreshed by using the Refresh option on the collection.

Workspaces and Collections Created from Search

Workspace is one setting that can cause the same collection created from a search to return different results. To illustrate, consider a search that uses the 'Search from List' criterion with the IDs of three objects and that was run from the Main workspace. None of the three objects are approved. The search is saved as a collection.

On the Tree tab, the collection displays the three objects, shows a count of 3 in the 'Estimated Amount of Objects' parameter, and the 'Search URL' includes the list of IDs from the search.

Changing the workspace to 'Approved' continues to display the same results since the collection has not yet been refreshed.

Right-click the collection and select 'Refresh' to run the search with the current settings.

The refreshed search in the 'Approved Workspace' does not include any of the objects returned when originally searched, which means the ThreeObjects collection in this workspace is empty.

To display the unapproved IDs again in the Main workspace, refresh the collection again with that workspace selected.

Language-Dependent Search and Exports

Search results are dimension-dependent. A search in one context can display one set of objects while the same search in another context can display a different set of objects.

Important: The recommended method that addresses dimension-dependency is to search on the attribute ID with a wildcard (*) since it allows users to export results regardless of the context that the search was performed in, or the context selected for export.

When searching and using collections with context-dependent data, consider the following:

  • Because the name of a language-dependent attribute can be different based on context, name is not a reliable criterion for repeatable searches. Searching based on an attribute name can return unexpected results depending on the selected context. Instead, use the 'Search from List' criterion with the ID option to search on the object's ID, since the ID is the same regardless of the selected context or value changes.

    For example, consider an attribute with name of 'Description' in the English context and the name of 'Descripción' in the Spanish context. In both contexts, the ID is the same. While in the Spanish context, searching for attribute name of 'Description=100%*' returns zero results because the attribute name is 'Descripción' and no attribute name of 'Description' exists in the Spanish context. To find the intended information, use the 'Search from List: ID' option, as defined in the Advanced Search: Search from List topic.

    Important: Regardless of the context selected during search, the exported file includes data based on the Context parameter on the Advanced step of the Export Manager. For details, refer to the Export Manager - Advanced topic in the Data Exchange documentation.

  • When exporting search results or exporting a collection made from search results, the context selected when performing the search is used in the 'Displaying # of # results' list of objects found and the Export Manager Advanced tab Context field determines which values are exported.

    If a search or a collection from an Advanced Search is based on a language-dependent attribute's Name, the export file is blank if the context selected in the Export Manager does not match the context selected during the search or collection creation.

To export objects with their relevant language-dependent attribute values, regardless of the context in use during search or collection creation, use the 'Search from List' criterion with the ID option from the dropdown (as defined in the Advanced Search: Search from List topic). This ensures that the attribute values are identified by object IDs which are the same for all contexts.

The example outlined below illustrates how creating a collection from search results can return different objects, based on the dimension-dependent values in the context being searched.

This search is performed in the 'English US' context for the value 'Blue' in the 'COLOR (COLOR)' attribute. The search finds three objects with the value.

One of those objects has a translated value of 'Azul' for the language dimension point in the 'Spanish MX' context. The other objects have no value for the attribute.

Performing the same search again in the 'Spanish MX' context returns no records since the value of 'Blue' does not exist for any of the records in the searched context.