Reference dynamic metadata in CTL

Is it possible to reference dynamic metadata in CTL? It looks like the code to declare the metadata in CTL is:

mymetadata;

in which metadataname is the value in the “name” field on the “Record” tag in metadata. However, in dynamic metadata, there is not a record tag to be referenced. Is this not a possible option? I confirmed this by moving the “name” filed to the Metadata tag and it does not recognize this as metadata, even on User created metadata.

Any help would be appreciated.

Hi jblythe99,

In the case of Dynamic Metadata, it works a bit differently when referencing in CTL. The code to reference the dynamic metadata is:

mymetadata;

TableName being the name of the table in the SQL query you are referencing.

I would recommend having to parameters one for the SQLQuery and another for the TableName. That way you can just use the parameter in the CTL, thus having the process be more dynamic.

Thank you! This is exactly what I needed.