Minimum or Maximum Rule Type

Minimum or Maximum Rule Type
calac41
The minimum (min)/maximum (max) rule declares a parent attribute to be maintained as the min/max of a designated child role's maxed attribute, with an optional qualification to filter child objects.
 
CA Live API Creator
 updates the value of the attribute to reflect the min/max of the specified attribute in the child objects whenever necessary. This includes child objects that you add to and remove from the parent object, as well as modifications to the children objects that change their qualification in the min or the min value. The changes to the child triggers min/max processing. You can view these changes in the log.
For more information about the log, see Debug.
Create a Minimum or Maximum Rule
Prerequisite:
 Your API is connected to an active database that contains at least one table or view.
Follow these steps:
 
  1. In API Creator, in the Manage section, click 
    Rules
    .
    If your API does not have existing rules, the Welcome to Rules page appears. If your API has existing rules, they are listed on the By entity tab by default.
  2. Click 
    Create a Rule
    .
  3. Select the 
    Minimum
     or 
    Maximum
     rule type, the entity to which it applies, and click 
    Create Rule
    .
  4. Define the parameters of the rule, and then click 
    Activate and Close
    :
    Title
     
    The title for the min/max rule. The title for rules does not affect logic processing. To apply a default value, leave this field blank.
    Required:
     No
    Entity/column
     
    The name of the parent entity and column representing the min/max result.
    Topics
     
    The topic that you want to associate to this rule.
    For more information about topics, see Manage Topics.
    Children
     
    Defines the child role (first combo box) and attribute (second combo box) being minimized/maximized.
    For more information about roles and foreign key-based relationships, see Data Sources.
    Qualification
     
    Boolean JavaScript expression designating the child rows checked for the min/max.
    Optional: 
    Yes
    Active
     
    Select to activate the rule (the definition must be complete).
    SQLable
     
    Indicates whether you can optimize the rule by executing it in SQL instead of in JavaScript.
    Just In Time
     
    Specifies that 
    CA Live API Creator
     recompute the data values.
    If the value in the database is null, 
    CA Live API Creator
     executes the rule on the first read, stores the value for that column in the database, and returns the value. To prevent 
    CA Live API Creator
     from executing rules with null return values on every read, the rule should never return a null value.
    Specifying min/max rules as Just in Time (JIT) can affect performance whenever new values are computed on the fly.
    For more information about JIT, including how to specify to have 
    CA Live API Creator
     recompute your rules when/as it detects null vales, see Synchronize Data with Logic.
    Name
     
    The name of the min/max rule. Leave this field blank for the system default.
The min/max rule is created.