Make airtable data available for javascript code

Hello everyone, i have a list of data that i get from airtable using built-in softr table block, i want to use this data to do some calculations with javascript custom-code, but i didn’t know where to get this data from.
Can anyone help?

1 Like

Hello @Med-Oks,
could you please provide more details so I can help. I need the mapped and published table and also what should be calculated?

I just need a way to be able to use displayed table data inside javascript in general.

Ok, to get the displayed records you will need to listen to a custom event bellow that is triggered on every data response from Softr data service. It can be used for getting the data and using it. You will need to get values using selectors for your specific field.

	const onRecords = (e) => {
		setTimeout(() => {
			// The block finished rendering 
			// You may do some staff here.
		}, 50);
	window.addEventListener('get-records-table1', onRecords);

Exactly what i was looking for, thank you so much!

1 Like