How to setup SQL query call based on dropdown information


Is it possible to call a specific query based on what user selects from a dropdown?
So I have queries which go like this, L3, L5, L7 etc from an external database.
Then a user will select a number from a dropdown and whatever number he selects, that query will be performed → if 3 then L3 will be called, if 5, then L5 etc…
Is this possible? My dropdown looks like this now and I want to update all page with queries from what user selected

Screenshot 2023-05-02 132824

Yes, you can do this but you’ll need to hardcode it (I can’t think of any other way). You’ll need a different SQL query for each choice and a different repeating group for the results of each query. Set the data source of each repeating group to be the specific query for that repeating group. Then, kick off a workflow when the drop down is selected. In the workflow, use the “only when” in each activity to display the correct repeating group and hide the others. For example, the first activity would trigger “only when dropdown choice = 3”, the second “only when dropdown choice = 5” and so on.