When I get a List/Record field value in Freemarker...
# ask-stanley-ai
a
When I get a List/Record field value in Freemarker, how do I get the ID value instead of the text name label?
c
AI generated answer (using internal Slack threads):
In Freemarker, to get the ID value of a List/Record field instead of the text name label, you can use the
record.getValue
method instead of
record.getText
. Here's an example of how you can do it:
Copy code
code
var recordId = record.getValue({
    fieldId: 'yourFieldId'
});
In this example,
yourFieldId
is the ID of the field you want to get the value from. This will return the internal ID of the selected option in the List/Record field, not the text label. Remember,
record.getValue
returns the internal ID of the field, while
record.getText
returns the display text of the field. ****** 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.822138
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821992576
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819375753
Please provide your feedback on this answer.