Search code examples
freemarkerresponsys

Oracle Responsys - RPL to pull in data from supplemental tables (like FreeMarker as well)


I'm sure it's a stretch here seeing if anyone knows the answer to this, but I'm trying to come up with an RPL to pull in another RPL from a supplemental table. RPL is Responsys' programming language that is very similar to FreeMarker, so if you know the answer in FreeMarker please share as well.

For example, we have a dynamic variable named "firstname". We are adding the dynamic variable "firstname" to many campaigns, so instead of setting it equal to the RPL to pull in the first name, we want to use a supplemental table to store the RPLs, and reference them in the dynamic variable. That way as we need to, we can update one table to update all campaigns.

I've tried using

<#data table as table>
<#filter variablename = firstname>
<#fields code>
${code}
</#data>

Any help is super appreciated!


Solution

  • Have you tried the exec built-in?

    Like this:

    <#data table as table>
    <#filter variablename = firstname>
    <#fields code>
    ${code?exec}
    </#data>
    

    Here is the built-in description

    expr?exec

    Uses the script specified in the expression and executes it like a template. This built-in is similar to the eval built-in, except that it allows directives. Expressions must be enclosed in ${}. The result of this built-in is always a string

    I hope it helps you.