This is a post returning to the forum post that we responded to recently. The request was to be able to manage, using Oracle Intelligent Advisor and Oracle B2C Service Cloud, an Entity Collect that will display existing data loaded from B2C Service, and that will also be used to also create new records during the session.
The first question is “How to stop existing records from showing up in the Entity Collect – we only want to see new records?”
This would require a custom Entity Collect compound styling extension, since the row object is a child of the Entity Collect styling object. The technique is similar to existing Styling Extension, but using a callback function to dynamically apply one of two styles to an Entity Collect that has the custom property set according to this example:
OraclePolicyAutomation.AddExtension({
style: function(interview) {
return {
tabularContainer: function(control) {
if (control.getProperty("demo") == "highlightrow") {
return {
"row": {
className: function(context) {
return interview.getValue("incident_id", context.entity, context.instance) > 0 ? "HideClass" : "DontHideClass"
}
}
}
}
}
}
}
});
In the above code, the “incident_id” is the field we shall use for our dynamic condition (this is not a requirement, simply a demonstration). If the field has a value greater than 0 then it must be an existing record (since incident Id in this context is a numeric attribute and underlying field in Oracle B2C Service Cloud).
Assuming you have a couple of styles in a CSS stylesheet to match the names used above (again neither the names nor the styling rules are required to be the same as this, the example is just for demonstration), then you could choose to color the rows differently, hide them, disable them or whatever you wanted to do in your CSS rule:
.HideClass {
background-color: rgb(255, 0, 0)!important;
}
.DontHideClass {
background-color: rgb(255, 255, 0)!important;
}
The resulting extension will dynamically assign the styling to each row in the Entity Collect:

We’ll talk about the second part of the question in a later post. For more examples of extensions, check out our online store.
If you are interested in this subject, check out these related posts: