Does anyone here know how to make a header and footer for a .txt file in xano?
I'm planning on creating a file resource (.txt) that has a sample format like this:
HEADER 00000001
DETAILS/NAME/MMDDYYYY
FOOTER 00000001
The details' data will be taken from a table while the header and footer are separately saved in a DB.
Another thing, is it possible to create a file name sequence number that increments whenever a new file is added? Example, file name is FILE000001.txt, the next file on the list would be FILE000002.txt
Any suggestions would be highly appreciated. Thank you in advance!
Best Answer
-
@chrstnstl - you can definitely do the incremental filename with a little help from filters. If you are able to go to the DB to get the previous file name, you can use a filter like substr (or even the trim filters) to extract the integer from the text. Then increment the integer by 1 and update the original text string with the new value.
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