-
Goal:
From a JS script call a query for each element of a given array whereas the array defines the resourceId that the same SQL query should be run on. -
Steps:
- created all resources for my different DBs
- in my app, created a query and clicked the fx button and pre-selected one of the DB resources.
- created a JS script that has a
const dbs = ['resource-id-here1', 'resource-id-here2', ...]
- tried to trigger via:
.. = Promise.all(dbs.map(id => {
query1.resourceNameOverride = id; // seems to have no effect
return query1.trigger();
}));
This results in resolved promise values all with the same DB being used (the one that is pre-selected).
How do I trigger the same query, but with different resource ids without having to hard-code/manually create a query for each resource/db in my app?