Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Aside from using Javascript, how can I concatenate a string with a variable and assign it to a new variable?

Not applicable

Already tried using Assign Message policy but apparently we cannot use Assign Variable to concatenate string with a variable. I tried doing it with the <Ref> tag.

Solved Solved
0 6 3,716
1 ACCEPTED SOLUTION

New (better) answer to an old question.

You can now concatenate within AssignMessage/AssignVariable, using the new Template element.

This is available in Apigee Edge Saas as of November 2018, and will be in OPDK in the January release, 19.01 (I believe).

Example:

<AssignMessage name="AV-1">
  <AssignVariable>
    <Name>name_of_variable_to_assign_here</Name>
    <Template>Hello {request.queryparam.greeting}</Template>
  </AssignVariable>
</AssignMessage>

View solution in original post

6 REPLIES 6