com.smartgwt.client.docs

## Interface RuleCriteria

-     public interface RuleCriteria

  ### Dynamic Rules

  If a property says it supports "rule criteria" it means that the criteria will be evaluated in the context of the current `Canvas.ruleScope`, so can set `Criterion.fieldName` to a path that references state in the current rule context.

  Because this type of criteria are allowed to reference UI state (such as whether any records are selected in an adjacent grid) they are not generally used to filter DataSource records, since such criteria would not be able to be evaluated on the server.

  All RuleCriteria are also `Dynamic Criteria` unless otherwise noted.

  Schemaless Criteria Evaluation

  Values manually provided to the ruleScope with `Canvas.provideRuleContext()` do not have a schema definition unless the DataSource and optionally the fieldName are provided. When no schema defines a value, criteria evaluation uses the following means to compare values:

  - Date values are compared as a logical date - without time part (see `DateUtil.compareLogicalDates()`)
  - All other values are compared using the JavaScript `==` operator
  See Also:
    `Tab.getVisibleWhen()`, `Tab.getEnableWhen()`, `Canvas.getVisibleWhen()`, `Canvas.getEnableWhen()`, `FormItem.getRequiredWhen()`, `FormItem.getVisibleWhen()`, `FormItem.getReadOnlyWhen()`, `FormItemIcon.getEnableWhen()`, `FormItemIcon.getVisibleWhen()`, `ButtonItem.getEnableWhen()`, `ListGridField.getVisibleWhen()`, `ListGridField.getEnableWhen()`, `MenuItem.getEnableWhen()`, `MenuItem.getVisibleWhen()`