You can create a dynamic selection. When choosing a dynamic
selection, you receive an updated search result every time you run
the selection
Before you begin
Ensure that you have the information about the type of selection
that you would like to create.
About this task
Dynamic selections are useful for getting the updated search
results. For example, you might want to create a dynamic selection
to retrieve the updated sales results of cars for the current month
when you run the dynamic selection.
Procedure
- Create the selection. Use any one of the following methods:
user interface, Java™ API, or
script API.
Option |
Description |
User interface |
- Click Product Manager > Catalogs > Catalog Console..
- Choose a catalog.
- Click Rich Search.
- Provide the required details.
- From the Save search as field, select Dynamic
Selection.
- Provide a name for the selection.
- Provide the search criteria.
- Click Search.
Note: You can edit items in dynamic selections by navigating
to Product Manager > Selections > Selection
Console. Click on the icon for Preview this
selection . After you select an item that you want to
edit in a dynamic selection, you must click Edit Selected at
the top of the page instead of Edit at the
extreme right of a row. This will enable you to save any changes you
make to the item.
|
Java API |
The following sample Java API
code creates a dynamic selection.Context ctx = PIMContextFactory.getCurrentContext();
SelectionManager mgr = ctx.getSelectionmanager();
DynamicSelection sel = mgr.createDynamicSelection("my dynamic selection", " select item.pk from
catalog('my catalog') where item['myspec/myattribute'] = 'abc' ");
sel.save();
|
Script API |
The following sample script creates a dynamic selection.var ctg = getCtgByName("my catalog");
var sel = new DynamicSelection("my dynamic selection", " select item.pk from catalog('my catalog') where item['myspec/myattribute'] = 'abc' ");
sel.saveSelection();
|
The selection is created, users can view it in the Selection
console.
- Optional: Run the an dynamic selection.