Hi everyone,
In certain scenarios, I need to adjust my SRM service so that instead of including the entire element, it only includes a specific row from a table.
Here’s the context:
-
When the PLS (Profile Load Script) is triggered, it dynamically generates rows in a table (via interapp call)
-
I only know which rows to include at that stage.
-
Since the same element might be used across multiple bookings, I want to include just one specific row from one specific table in the SRM service for this particular case (keeping it simple here).
Normally, having the full element in the service works fine, so I’d like to let SRM create the service as usual. However, for this corner case, I need to fine-tune the service content after creation.
I did a follow on Cube and noticed it sends a SetDataMinerInfo
message (what=75
for service) with a pretty complex StrInfo2
XML to achieve this.
So, I’m wondering:
🔍 Is there a better, more structured way to do this? Something like:
// Example of pseudo-code I'd like to run
var service = engine.GetServiceByName("MyService");
var element = service.FindElement("MyElement");
// Apply a filter to only include a specific row (e.g., with key "rowKey") in a parameter/table (e.g., parameterId 4200)
element.ParameterFilters.Add(new ElementParamFilterConfiguration(4200, "rowKey", true, FilterType.Display));
service.Update();
Hi José,
Below you can find an example that I used to add CPU parameter for SLAutomation row from Microsoft Platform connector.
var element = engine.FindElement("Jorge PC");
var service = engine.FindService("Service Name");
var elementInService = service.ServiceInfo.ServiceParams.FirstOrDefault(x => x.DataMinerID == element.DmaId && x.ElementID == element.ElementId);if (elementInService == null)
{
engine.Log("Element is not present in the service");
return;
}var includedParams = elementInService.ParameterFilters?.ToList() ?? new List<ServiceParamFilter>();
includedParams.Add(new ServiceParamFilter(107, "*SLAutomation*", true));elementInService.ParameterFilters = includedParams.ToArray();
var updateServiceMessage = new AddServiceMessage
{
DataMinerID = service.DmaId,
Service = service.ServiceInfo,
};engine.SendSLNetSingleResponseMessage(updateServiceMessage);

Thanks Jorge, it worked.
Kind regards