Outputting a form to a text document

Hi,

Currently on day 3 of a trial of retool. Looking to convert a couple of systems i look after under one roof. So far i have been able to convert and improve 3 of them which i am really digging!

Not after how to do it, as i prefer to work things out myself but wondering if, in theory, it would be possible to output a form to a text document (i could potentially live with PDF. Also it is a very long story why the output needs to be a text document)

The form would need to take the form field names i.e. (Date) and the field output (i.e. 06/01/2021) and insert delimiters ( : and ; ). It would potentially look like this

Date: 06/01/2022;
Address: 123 High Street;
Job_1_Description: Oil; Net Cost: 20.00; VAT Cost: 5:00; Gross: 25.00;
Job_2_Description: Water; Net Cost: 120.00; VAT Cost: 25:00; Gross: 145.00;

Again, dont want to know the actual code, just that potentially it would be something achievable within the confines of retool application.

Many thanks,

Hello!

Happy to answer your question. And, fighting the urge to share how to do it! :grinning_face_with_smiling_eyes: So, you're asking if you could have a form and export the user input into a text document? Yes! That is possible. Happy to help you if you have any questions.

John

Hi John!

Go on then... If you can share the answer that easily as i have had a productive 2 days on my own working retool out using the RestAPI function \ SQL server integration and would probably get stuck on it tomorrow in work all day :rofl:

This will be the final piece of the puzzle and retool would have earned their subscription from the team and i!

Mike

Hello again, Mike!

So, we have a utility where you can download data from your Retool app to a particular filetype (in this case, .txt)

https://docs.retool.com/docs/scripting-retool#utilities

So, this might not be your use case specifically (please let me know!), but if you are pulling that form data from a query, you could use a transformer to parse the data with JavaScript according to your needs, and then export the whole thing using that utility. You can see in the Docs that you could use a PDF as well.

If you have any questions or run into problems along the way, please let us know!

John