# Any way to write to a file on the gateway or to database from javascript?

**URL:** <https://forum.inductiveautomation.com/t/any-way-to-write-to-a-file-on-the-gateway-or-to-database-from-javascript/51442>\
**Category:** Module Development\
**Created:** [September 29, 2021, 1:48pm UTC](https://forum.inductiveautomation.com/t/any-way-to-write-to-a-file-on-the-gateway-or-to-database-from-javascript/51442 "2021-09-29T13:48:18Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 1, 2021, 6:35am UTC](https://forum.inductiveautomation.com/t/any-way-to-write-to-a-file-on-the-gateway-or-to-database-from-javascript/51442/16 "2021-10-01T06:35:51Z")

</div>

im making quite the complex table component xD… Where its possible to group/filter/rearrange column and rows in the clients browser. And to save these layout states and apply the one you want, for now i save it in a db using some bindings, but now im trying to make it so it can work without having to use bindings/external code.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d3b6e8fdab514a45796b747c4bef4242b15d5a71.png)

(both chart and table are one and the same component, chart can be opened by a context menu on right click)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/3/e35c16f197ed7a62f6fc7c2b0c0747c5e5f6e582.png)

And yeah i guess that is possible, But i think ill be happy if it works in just the java bit lol, my java is a bit rusty. And its not so important where the states get saved anyway

---

_[View the full topic](https://forum.inductiveautomation.com/t/any-way-to-write-to-a-file-on-the-gateway-or-to-database-from-javascript/51442)._
