Appending to a text variable
Options
![Georges Duverger](https://us.v-cdn.net/6037124/user_avatars/1709796.jpg)
Georges Duverger
Trusted Xano Expert ✭
I'm constructing a text variable by appending a mix of static texts and variables to it. I'm using the `sprintf` filter to do so. It works well but it gets a little cumbersome after a few variables. Is there a better (more flexible) way to achieve this use case?
[Screen Shot 2022-03-08 at 8.27.34 PM.png]
[Screen Shot 2022-03-08 at 8.27.34 PM.png]
Comments
-
There is an easier way by composing functions! I made a quick vid in the hope that showing might help: https://www.loom.com/share/d9f201cd36964100b7585593a57878e9
-
I just watched the video. This is a great idea! Thanks for sharing, Ray.
-
Depending on your use case, that object I 'build' in the video could instead just be a record from the database. That would save you from pulling out into a bunch of scalar (simple text) fields just to rebuild again. Either way, hope this helps save you some work!
-
awesome work, I'm loving seeing all of your help comments in this community!
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