Data Source Dynamic Parameter

Jefe187

New Member
Joined
Oct 24, 2015
Messages
13
Fairly new to Power Query or the get data function. I am trying to set up a query from an Odbc data source with a dynamic parameter for the Schema. The server will always remain the same however the Schema (not entirely sure what that is?) is what will change then the table name will remain the same. I manually connected to it and attached the advanced editor below. The Z2A1 is constant and the INV table is always the table name, it is the A2$ schema that will need to change. I would loveto have this in a parameter that a user can input the correct schema whether isit A2$, A3$, etc and then refresh the query to get the updated INV table. Can anyone help with directions how to do this or is there an existing thread withinstructions? Many thanks in advance.




let
Source = Odbc.DataSource("dsn=Z2A1", [HierarchicalNavigation=true]),
#"A2$_Schema" = Source{[Name="A2$",Kind="Schema"]}[Data],
INV_Table = #"A2$_Schema"{[Name="INV",Kind="Table"]}[Data]
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top