filterSelection = Document.ActiveFilteringSelectionReference if jsonParam['filteringScheme'] == None else Document.Data.Filterings[jsonParam['filteringScheme']]
dataTable = Document.ActiveDataTableReference if jsonParam['dataTable'] == None else Document.Data.Tables[jsonParam['dataTable']]
# if the document does not contain data tables and several data tables are added in the script, there will be no active data table
if dataTable == None:
	dataTable = Document.Data.Tables.DefaultTableReference
filter = Document.FilteringSchemes[filterSelection][dataTable][jsonParam['column']]

filterTypeId = clr.GetClrType(FilterTypeIdentifiers).GetField(jsonParam['type']).GetValue(FilterTypeIdentifiers)
if filterTypeId != None:
	filter.TypeId = filterTypeId
filter = filter.As[globals()[jsonParam['type']]]()
