def updateParameters(self, parameters):
        """Modifies the values and properties of parameters before internal
        validation is performed.  This method is called whenever a parameter
        has been changed."""

        zone_parameter = parameters[0]
        input_parameter = parameters[1]
        variable_parameter = parameters[2]
        output_parameter = parameters[3]
        type_parameter = parameters[4]
        ignore_parameter = parameters[5]
        zonefield_parameter = parameters[6]

        # Populate the output netCDF file parameter with a reasonable default
        # (i.e. the name of the variable with 'zonal_' appended to it.)
        if (variable_parameter.value is not None) and (not output_parameter.altered):
            out_file_name = variable_parameter.valueAsText + '_zonal'
            # Generate a unique name
            i = 1
            temp_name = out_file_name + '.dbf'
            while arcpy.Exists(temp_name):
                temp_name = out_file_name + str(i) + '.dbf'
                i += 1
            out_file_name = temp_name
            workspace = arcpy.env.workspace
            output_parameter.value = os.path.join(workspace, out_file_name)

        # Set zone parameter default
        if (zone_parameter.value is not None) and (not zonefield_parameter.altered):
            valid_raster_types = ["RasterLayer", "RasterDataset"]
            valid_feature_types = ["ShapeFile","FeatureLayer", "FeatureDataset"]
            desc = arcpy.Describe(zone_parameter.value)
            if desc.dataType in valid_raster_types:
                zonefield_parameter.value = "Value"
            else:
                zonefield_parameter.value = "FID"

        return
dataset/ETHPy150Open Esri/solutions-geoprocessing-toolbox/suitability/toolboxes/scripts/MultidimensionSupplementalTools/MultidimensionSupplementalTools/Scripts/mds/tools/multidimensional_zonal_statistics_as_table.py/MultidimensionalZonalStatisticsAsTable.updateParameters/original