Although it is possible to query profile instances using the GQI Get Profile Instances data source, as per DM 10.3.10, it requires enabling a soft-launch option GenericInterface. See the following question for context: How to display Profile Instances on low code app - DataMiner Dojo
The customer wants to avoid enabling a soft-launch option in Production.
Another alternative is to use GQI Adhoc data source to query profile instances. Can someone share a sample script showing how to do so? The documentation profiles some general guidelines Configuring an ad hoc data source in a query | DataMiner Docs
You can use the GQIDms class in an ad-hoc data source for sending SLNet messages to do anything you want, including retrieving profile instances.
Here's a simplified code snippet on how to do this. You use the IGQIOnInit interface and OnInit you retrieve the DMS object. With that object you can send SLNet calls.
[GQIMetaData(Name = "MyAdhocDataSource")] public class ElementsByEvent : IGQIDataSource, IGQIInputArguments, IGQIOnInit{
private GQIDMS _dms;
public OnInitOutputArgs OnInit(OnInitInputArgs args)
{
_dms = args.DMS;
return default;
}
public GQIColumn[] GetColumns()
{
//...
}
public GQIArgument[] GetInputArguments()
{
//...
}
public OnArgumentsProcessedOutputArgs OnArgumentsProcessed(OnArgumentsProcessedInputArgs args)
{
//...
}
public GQIPage GetNextPage(GetNextPageInputArgs args)
{
//...
}
private void MyMethod()
{
//... here you can use the _dms class to send SLNet messages
}
}
Hi Miguel,
I don't have a code snippet, but in this case I believe you will need to use the GQIDms class. Using this class you can implement a SLNet call to retrieve the profile instances. Having a quick look at the SLNet calls, you could use GetProfileInstanceMessage.
Hope it helps.