Insert a string from a text Input with another string from a query

I want to capture two strings separated by a pipe for a simple activity log.

{{}} | {{}} works
{{}} | othertext works
{{textInput.value}} | othertext does not work
{{textInput.value}} | {{}} does not work

Is the instances where it does not work, only the textInput.value is captured. othertext is omitted.

In the next screenshot, you can see the definition for the LongText field in the changeset.


In this second screenshot, you can see the results from the query. It does not contain the second string.


Any ideas? I'm not sure if this is a bug or just something I am overlooking.

I heard back from Retool support on this. Here is the takeway:

If you're trying to concatenate the values of two components, the values need to be concatenated inside the same curly braces so it is considered a single JavaScript expression, rather than two. In this case, unless wrapped in a string (eg col_2)"" , an array[] or an object{} , if two JS expressions are included, only the first will be sent in the request.

Here is a working example:

{{ textInput5.value + ' | ' +textInput6.value}}

Thanks, Milly in support!

1 Like

@awilly Thanks for posting what you learned back here so that others working through something similar can learn too! :slight_smile: