Dynamic Query using a module

I think I am running into a limitation with using a module and input type is query. The module input of type “Query” can only be assigned a single, fixed query (from a dropdown) in the app editor.

My goal is to have a reusable modal within a module that confirms to run a query. The queries are operations examples are Delete a User, Disable a User, Assign User as Admin. I was hoping to reuse the same module for simplicity, design and repeatability.

The Issues is that although I can dynamically change Data inputs I cannot dynamically set the Query input. I realise this maybe a limitation but wondering if there are workarounds to this?

This is a known limitation with module inputs of type “Query.” You can’t dynamically assign queries like you do with data inputs. One workaround could be passing a string name of the query as an input and then using a switch statement or conditional logic inside the module to trigger the correct query. Not ideal, but it keeps things reusable.

@willis_48137,
Another workaround is to always pass the same query from the parent app to the module and include logic inside that query to trigger the appropriate action—such as delete, disable, or assign admin—based on input parameters. This allows you to keep the module reusable while still dynamically controlling which operation runs, effectively making it dynamic.