Switching environments on Workflows doesn't change database

I have been trying to set up triggers to run for both my production and staging environments for my Retool workflow, but it seems that when I switch environments, the Database never changes.

In production:
image

Switching to staging:
image

And when I click on Database manually to change it, the Collection gets cleared:
image

I want to be able to run triggers for my production environment using database dexter_prod and the expertDataworks collection and run triggers for my staging environment using database dexter_staging and the expertDataworks collection. Is this possible?

Hi @joshuachough!

It's possible to set different default databases depending on the environment in your resource configuration:

When you leave the database field blank in the query itself it will then use the default you've configured:

If you need a more granular configuration you can also try using a ternary that references workflowContext.environment in your query:

Do either of those seem like they could work for you?