ATG-Endeca Record Filter

505 Views Asked by At

Please see the below jsp_ref data from endeca. So my question, is it possible to get /retrieve the value of dispName from the record, using a recordFilter, during run-time ??

How can i get the propertynames value, during rendering the product display page. Note : I cannot go with endeca manipulator approach.

dispName = record.getProperty("sku.displayName")
StockStatus = record.getProperty("product.stockStatuses");


sku.baseUrl:      atgrep:/ProductCatalog_production/sku/017229136779   
sku.creationDate:      1485194500638   
sku.displayName:      LG M95 BT HEADSET BL   
sku.endDate:      32506394714894   
sku.margin:      0.000000
product.stockStatuses:      1000:Out of Stock   
product.stockStatuses:      100411:Out of Stock   
product.stockStatuses:      100412:Out of Stock   


if(null != xxxxPage && !((String) xxxxPage ).isEmpty()){
PropertyConstraint propContraint = new PropertyConstraint(EndecaConstants.ITEM_SALE_FLAG,EndecaConstants.CONST_1);                  
return propContraint.toString();
}
PropertyConstraint propContraint = new PropertyConstraint(EndecaConstants.ITEM_SALE_FLAG,EndecaConstants.CONST_1);              
return propContraint.toString();
2

There are 2 best solutions below

0
Devika Awasthi On

You can use endeca properties for filtering if you have enabled those as record filters by adding the same in NavigationStateBuilder component. Record.getattributes should give you a map of indexed properties/dimensions and corresponding values..

0
Joseph SKariah On

We are talking about two different aspects. 1. Record Filtering. Think of this as a sql query which filters the rows based on some combination of values. In order to do this we use PropertyContraints. So in your example you can tell endeca, give me records with ITEM_SALE_FLAG as CONST_1. Pass this property constraints to query and process it using a MdexResource, you will get a recordlist with all records matching that constraint. 2. Record Property. While asking for recordlist you coudl specify whether you want all the properties on each record or just select some of them. If you want to select you can use setSelection(PropertyList) or dont set it. In either case you can retrieve the property on each record with record.getProperties(). Here is the example code. https://docs.oracle.com/cd/E29584_01/webhelp/mdex_basicDev/src/cbdv_erecs_props_display.html