Here's a quick guide on when to use double curly brackets ("double curlies") in your Retool apps.
{{}} |
Case | Example | ||
---|---|---|---|---|
![]() |
Referencing any Retool-specific values | {{ query1.data }} or {{ text1.value }} |
||
![]() |
Writing JavaScript | {{ checkbox1.value ? 'approved' : 'denied'}} in a Text component's value field |
||
![]() |
Inside Transformers | const data1 = {{ query1.data }} |
||
![]() |
Inside JS queries | const data1 = query1.data |
Some notes:
-
In general, the space between the curlies and the text is optional.
{{query1.data}}
is the same as{{ query1.data }}
.
-
Triple curlies can occasionally cause problems, so a space might be helpful.
{{{'key':123}}}
might cause errors. Try{{ {'key': 123} }}
instead.
-
If you notice a value is being displayed as
table1.data[0].email
instead of the actual email value, that's an indicator you need double curlies.
Leave any thoughts or feedback below
!