Access Data Table Records from JS
Here is a list of a few options can use a few options to access an array of records for programmatic use.
Option 1 - The Tadabase JavaScript API (This is the option in the image above)
The JavaScript API 3 can be used to get an array of records that are currently being displayed on a component. For example, if I have a table component on a page with the component ID of component_3, I can add the following code to the JavaScript section of the page.
TB.render('component_3',function(data){
console.log(data.records);
});
Option 2 - Custom Component
Depending on your use case, you may be interested in Custom Component.
More info can be found here -> Custom Component | Tadabase
Custom component helpers can be found here -> Custom Component Helpers | Tadabase
Option 3 - Our REST API
More info can be found here -> https://docs.tadabase.io/categories/manual/article/rest-api.
Please never save any API credentials in the Javascript of the page or app. This is 100% not secure, and your credentials will be exposed.
You can likely achieve similar results by using hosted scripts and, for example, a Google script as a web app or, more complex, a lambda function.
Original Community Post:
Access data table records from JS - Community Discussions / How Do I - Tadabase Community
We'd love to hear your feedback.