Set field value in custom code block

How can I set the field value in custom code?
I am writing a custom code block that shows a single select dropdown, and the result of this selection needs to set the value of the field that syncs back to airtable.

Can you say a little more about what “syncs back to airtable” means? Which mechanism in Softr are you using for this?

Well, I’m new to this project so I assume that any field I set will auto-sync back to airtable. Something equivalent to editing a record on the Softr Side

I have a table block with a data source set to an airtable base/table.
Then one of the Item Fields on the table I’d like to create a button that opens a Modal that will have custom code block to set the value

I see what you are saying, but I’m still not sure how you intend to get the value back to the Softr server. There is presently no way to update a record in Airtable from a Softr page programmatically.