If there are multiple data tables in the analysis file, the expression for the input parameter (as a document property) needs to have the data table included too. Otherwise, the data function will not be able to find the correct column from the correct data table every time you change column from the drop down list. To avoid the issue, edit the input parameter via:
- Edit > "Data Function Properties" > Select your data function and click "Edit Parameters" > "Input" tab > Select your input parameter
Instead of using the expression above in the expression input handler, ensure the correct data table is selected in the "Data table" dropdown (for example, with "BASEBALL"), and update the expression to be:
[BASEBALL].$esc(${SelectColumn})
Now after the property control value changes with the selection of a new column, the data function will be able to automatically update using the newly selected column.
See the attached "QQ Plot Data Function Example.dxp" file as an example.