How to set values in a single column with result coming from different sql queries with Javascript?

I have a table with a column called "Progress".
Inside the table I bring the progress of my users in different sectors of the application.
How can I make a treatment so that if the progress is of an entity it appears in the "progress" column within my table? What if the progress comes from another entity and the result comes from another query, does that result appear in the same column? With Javascript? Is it possible?

Hi @umadevsofredora :wave:

Happy to help you out here :smile: majority of the time in Retool there are a bunch of ways to do the same thing and it usually boils down to what's best for each user -- You'd like to dynamically populate a column dependent on from where the data came from? :thinking: I'm thinking a JS query that fires on succession of something else beforehand that sets some sort of variable (global?) that'll help you determine what data source.