How to bookend content from a table with a custom string

I am working on a tool that auto builds javascript snippets based on some form data. I’m concatenating different snippets into one global snippet but I need to bookend the output with script tags (). I can’t figure out how to bookend the output with script tags directly on the canvas. Any thoughts?

Is it a particular character that is causing an issue? I’ve had to escape quotes when doing this with HTML:

" becomes \"

The problem is I’m not sure how to build the bookends into the formula. I need some way to say

formula({<script>} concatenate(table.column) {<script>})

@Lane_Greer

I’m unclear on your exact requirements, but maybe experimenting with this syntax can help you move forward:

Or, very similar but useful in possible format chains, Format("<script>{1}</script>", Table1.Column 2)

2 Likes

@Federico_Stefanato

I’ve been meaning to thank @Johg_Ananda for promoting Format() so heavily a few months ago. He caused me to give it closer consideration in some key workflows. Where it proved viable, I ran some performance testing and experienced 30% speed improvements.

So, I agree, Format() could be another good option here!

4 Likes

Wow: that’s impressive! Good to know: thanks for sharing!
I always preferred Format() for its elegance; and now it’s even more efficient.

1 Like