I mean how record is expressed by freemarker?
# ask-stanley-ai
s
I mean how record is expressed by freemarker?
c
AI generated answer (using internal Slack threads):
In Freemarker, a record is expressed as an object with properties that can be accessed using dot notation. For example, if you have a record object, you can access its 'trandate' property using
${record.trandate}
. Freemarker is used to transform the record into an HTML-like XML document. For example, if you have a date field in your record, you can format it to a specific format using Freemarker's built-in date formatting function, like so:
${record.datefield?string["yyyy-MM-dd"]}
. When dealing with lists in Freemarker, you can iterate over them using the
<#list>
directive. For example, if you have a list of 'apply' objects in your record, you can iterate over them and access each 'apply' object's properties like so:
Copy code
<#list record.apply as apply>
    ${apply.tranid}
</#list>
However, not all fields might be accessible this way. If a field is not accessible, you might need to add it to the record using a script before you can access it in Freemarker. If you need to access a complex object or a JSON string in Freemarker, you can use the
?eval_json
built-in. For example, if you have a JSON string in a custom field, you can parse it and access its properties like so:
Copy code
<#assign emailObj = transaction.customFieldName?eval_json />
${emailObj.subsidiaryName}
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.851299584
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821904957
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819064796
Please provide your feedback on this answer.