Change Log Filters

Sepasoft MES Module Suite

Change Lot Filters Object

A ChangeLogFilters object is used when requesting machine recipe change logs with the system.recipe.getChangelogHistory script function to narrow down the results that are returned. For example, if you only want the change log history for a specific production item (machine) and specific date range, the ChangeLogFilters object properties are set appropriately and are passed as parameters to the system.recipe.getChangelogHistory script function.

Object Creation

createNew()

Description

Returns a new instance of a ChangelogFilters object.

Info

Information

After setting various filter properties, it is used with the system.recipe.getChangelogHistory script function. 

Syntax

createNew()

  • Parameters

 None

  • Returns

  The new ChangelogFilters object. 

  • Scope

All

Code Snippets

Python
changeLogFilter = system.recipe.filter.changelog.createNew()
projectName = system.util.getProjectName()
eqPath = "Enterprise\\Site 1\\OEE Area\\Packaging Line 1"
end = system.date.now()
start = system.date.addHours(end, -24)
changeLogFilter.setItemPathFilter(eqPath)

##Note the recipe value and sub recipe value categories:
changeLogFilter.addCategory("sub recipe value") # for default/sub-recipe values
changeLogFilter.addCategory("recipe value") # for master/descendant values

changeLogFilter.setProjectName(projectName)
changeLogFilter.setFromDate(start)
changeLogFilter.setToDate(end)

##Initialize a dataset of the changelog history.
ds = system.recipe.getChangelogHistory(changeLogFilter)

Properties

addCategory(category)

Description

Add a category to include in the recipe change log history results. 

Info

Information

Multiple categories can be specified to be included in the results.

Valid values are :

  • "Recipe" to include change log entries dealing with recipe changes. Recipe changes include, adding new recipes, renaming recipes, deleting recipes, adding production items to recipes, etc.
  • "Recipe Value" to include change log entries dealing with changes of recipe values. This includes changing a value, reverting a value back to be inherited, etc.
  • SUB_PRODUCT_CODE to include change log entries dealing with sub product codes. This includes adding new sub product codes, renaming sub product codes, deleting sub product codes, etc.
  • SUB_PRODUCT_CODE_VALUE to include change log entries dealing with changes of sub product code values or default values for a production item. This includes changing a value, reverting a value back to be inherited, etc.

Syntax

addCategory(category)

  • Parameters

 String category - The category to include in the change log history for.

  • Returns

  Nothing

  • Scope

All

Example

Python
changeLogFilter = system.recipe.filter.changelog.createNew()
projectName = system.util.getProjectName()
eqPath = "Enterprise\\Site 1\\OEE Area\\Packaging Line 1"
end = system.date.now()
start = system.date.addHours(end, -24)
changeLogFilter.setItemPathFilter(eqPath)

##Note the recipe value and sub recipe value categories:
changeLogFilter.addCategory("sub recipe value") # for default/sub-recipe values
changeLogFilter.addCategory("recipe value") # for master/descendant values

changeLogFilter.setProjectName(projectName)
changeLogFilter.setFromDate(start)
changeLogFilter.setToDate(end)

##Initialize a dataset of the changelog history.
ds = system.recipe.getChangelogHistory(changeLogFilter)

getRowLimit()

Description

Gets the current row limit argument that is set on the filter.

Syntax

getRowLimit()

  • Parameters

 Nothing

  • Returns

 An integer defining the maximum amount of rows the change log data may return.

  • Scope

All

removeCategory(category)

Description

Remove a category for what has already been added.

Info

Information

Multiple categories can be specified to be removed.

Valid values are :

  • RECIPE to include change log entries dealing with recipe changes. Recipe changes include, adding new recipes, renaming recipes, deleting recipes, adding production items to recipes, etc.
  • RECIPE_VALUE to include change log entries dealing with changes of recipe values. This includes changing a value, reverting a value back to be inherited, etc.
  • SUB_PRODUCT_CODE to include change log entries dealing with sub product codes. This includes adding new sub product codes, renaming sub product codes, deleting sub product codes, etc.
  • SUB_PRODUCT_CODE_VALUE to include change log entries dealing with changes of sub product code values or default values for a production item. This includes changing a value, reverting a value back to be inherited, etc.

Syntax

removeCategory(category)

  • Parameters

 String category - The category to be removed from the log history for.

  • Returns

  Nothing

  • Scope

All

setFromDate(fromDate)

Description

Set the start of the date range to return change log history for.

Syntax

setFromDate(fromDate)

  • Parameters

 Date fromDate - The start date to return the change log history for.

  • Returns

  Nothing

  • Scope

All

setItemPathFilter(itemPath)

Description

Set the path of the production item to return change log history for.

Syntax

setItemPathFilter(itemPath)

  • Parameters

String itemPath - The item path to a production line, cell, cell group or location.

  • Returns

  Nothing

  • Scope

All

setProjectName(projectName)

Description

Set the project name to read recipe change log history.

Information

Recipe change log history is kept by project, and the project name is required with the system.recipe.getChangelogHistory script function.

Syntax

setProjectName(projectName)

  • Parameters

String projectName - The project name to read the change log history for.

  • Returns

  Nothing

  • Scope

All

setRecipeNameFilter(recipeNameFilter)

Description

Set an optional recipe filter.

Information The filter can contain ? and * wild card characters. For example:  "Recipe C*" will include all recipes that start with Recipe C. Recipe C1 and Recipe C21 will be included but Recipe D1 will not.

Syntax

setRecipeNameFilter(recipeNameFilter)

  • Parameters

String recipeNameFilter - The recipe name to filter the results for.

  • Returns

  Nothing

  • Scope

All

setRowLimit(rowLimit)

Description

Limits the amount of rows to query when accumulating Recipe Change Log data. The Default limit is 2000.

Syntax

setRowLimit(rowLimit)

  • Parameters

 Integer rowLimit - The maximum amount of rows that may be processed.

  • Returns

  Nothing

  • Scope

All

setSubProductCodeFilter(subProductCodeFilter)

Description

Set an optional sub product code filter. The filter can contain ? and * wild card characters.

Syntax

setSubProductCodeFilter(subProductCodeFilter)

  • Parameters

String subProductCodeFilter - The subProductCode to filter the results for.

  • Returns

  Nothing

  • Scope

All

setToDate(toDate)

Description

Set the end of the date range to return change log history for. 

Syntax

setToDate(toDate)

  • Parameters

Date toDate - The end date to return the change log history for.

  • Returns

  Nothing

  • Scope

All

setUserFilter(userNameFilter)

Description

Set an optional user name filter. The filter can contain ? and * wild card characters.

Syntax

setUserFilter(userNameFilter)

  • Parameters

String userNameFilter - The userName to filter the results for.

  • Returns

  Nothing

  • Scope

All

setValueNameFilter(recipeValueNameFilter)

Description

Set an optional recipe value name filter. The filter can contain ? and * wild card characters.

Syntax

setValueNameFilter(recipeValueNameFilter)

  • Parameters

String recipeValueNameFilter - The recipeValueName to filter the results for.

  • Returns

  Nothing

  • Scope

All



Sepasoft MES Module Suite