Merge two variables / HTML and variables
Options
![Jonas Robertsson](https://us.v-cdn.net/6037124/user_avatars/2553137.jpg)
Jonas Robertsson
Member ✭
Trying to post html with some data from Xano to another api.
The main problem is that I have no idea how to basically do:
var text = "Some text"
var html = "
Creating the variables are easy but how to make the html variable both include html and the value from the text variable.
I don't get how to combine text strings in Xano.
Prepend and append could probably be used in this case, but gets kinda tedious when there are a lot of variables and html involved. Replace with some placeholders in the html could work but does not seem to exist.
The main problem is that I have no idea how to basically do:
var text = "Some text"
var html = "
"+text+"
"Creating the variables are easy but how to make the html variable both include html and the value from the text variable.
I don't get how to combine text strings in Xano.
Prepend and append could probably be used in this case, but gets kinda tedious when there are a lot of variables and html involved. Replace with some placeholders in the html could work but does not seem to exist.
Comments
-
It sounds like you are looking for variable substitution with sprintf
https://docs.xano.com/working-with-data/data-type-filters/text-filter#sprintf -
Thanks 👍
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback