For complex dashboards, you often need to get the values of the parameters and use the values to control the data generation. To get the value for a parameter, call the method $dashboardParameters.getParameterValue() with the parameter name that you specified in the preprocessing section.
For example, you can use the following line to get the content pack the user selected at runtime and assign the returned value to the variable $contentPack:
#set( $contentPack = $dashboardParameters.getParameterValue('contentPack'))
Note that the variable name does not have to match the parameter name. Also, you may directly pass the returned values to other methods shown below.