Ok, I have a table that has a pretty complication "if" ternary statement in it.
However, it is becoming quite difficult for me to determine "which" if statement is triggering the table dataset that fills the table. I know this sounds strange but, I can see the console and see that a certain dataset has been triggered. But, the wrong data is actually being displayed in the table.
Is there a way for me to determine "which" resource query is currently being used to populate a table? I looked at table1.data and that just contains the query results but nothing about which resource has populated the table. Any ideas? Thanks!
There is no straightforward way of doing it this directly from the table's data.
However, you could create a simple js query with the same terniary logic and log to your console, for each condition, which data source is being used. You can then change the variables impacting your conditions and see what the is being logged in your console by the JS query.
I had to remove and generalize the above data but it's essentially the same. How would I add console logging for each one here? The above is in the "Data source" for the table I am trying to work with. Thanks!
This transformer then will actually return a string with the data (you could arguably use transformer1.value as your data source and make it easier for you to modify it in the future).
That worked! Only problem is now - the table (tblUpsheet) doesn't seem to want to refresh even when the transformer is set correct. I can run the transformer query once and it works. But, if I run it the second time, the table will keep the results from the transformer data from the first run. Any way to force the table to refresh programmatically? Thanks!
So, are you using a transformer or a Js query? the trasnformer's value will update automatically whenever one of your variables changes.
Now, your table's data set should be updating automatically (although I've never tried this so I'm not completely sure if that's the case). Just a quick question: by refresh do you mean the data set or also the columns?
What happens if you right click on the table and click "Reset state", will that update the data source?
Nope. reset state doesn't do anything. I can't seem to find a way to have it "refresh". The only way I can get it to work is to manually go over to the query and just run the query that I know is supposed to be triggered and then it refreshes it (which tells me the transformer JS is working correctly and populating the correct query source).