Skip to Content

Dereference an Attribute for Template Parameter

In GTL you can pass parameters to templates, but they need to be values (no %variable% allowed). Is there a way to deference an attribute in the call? E.g., %templateTakingParams(%!table.column.Name%)%. Right now I'm creating a model-level variable before the call and using that, but it seems like a hack.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 28, 2019 at 11:50 AM

    Turns out you can pass variables.

    Pass the variable without the percent signs. For %variable%, use %template(variable)%.

    Then dereference it inside the template with %*@1%.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 08, 2019 at 02:01 PM

    You're right, you can't pass a variable to a template - I tried it recently. I had to create an extended attibute to pass instead, like you did.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.