Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
MessageML if Statement

I'm trying to send in an object into jinja2 template but this compartive doesn't work in any fashion. Is there any documentation that clearly states how this should work?
file

  
  
Posted one year ago
Edited one year ago
Votes Newest

Answers


Hi Jordi,

Thank you for your question,

Jinja2 is a templating engine for Python and should be possible to use it with Symphony BDK Python if the correct syntax is used. To ensure both Jinja2 & Symphony BDK Python is installed on your Python project, you will need the following packages are included in the 'requirements.txt':

symphony-bdk-python>=2.5.0
Jinja2~=3.0

From your screenshot - it looks like you are using FreeMarker syntax before the 'IF' condition. I would recommend referring to the Jinja2 documentation for the 'IF' condition:
https://jinja.palletsprojects.com/en/3.0.x/templates/#if

If you wanted to use the FINOS Generator Symphony (https://github.com/finos/generator-symphony) to generate the Symphony BDK Python, you will find that there is a Python file called 'gif_activities' under the 'src' folder. This file will be referencing a Jinja2 template called 'gif.jinja2' under the 'resources' folder that is used to generate the user's name on a Symphony Elements form once a slash command is initiated.

We also have the following template example on the following FINOS GitHub URL that also uses Jinja2 with the Symphony BDK Python:
https://github.com/finos/generator-symphony/blob/master/generators/python/templates/bot-app/gif_activities.py.ejs

Please take a look and let us know should you require any further assitance or have any feedback.

  
  
Posted one year ago
Kaosar Ahmed
310 × 3 Administrator
4K Views
1 Answer
one year ago
one year ago
Tags