Rules Engine

Follow

Rules Engine

The Rules Engine goes beyond toggle based rules and provides a way to add conditional statements to PrintNow's Print Editor in simple mode. This powerful feature can help support the most demanding text formating requirements in an easy to use interface. 

Conditions: (If, AND, OR, XOR) 

Target
is empty
Target
is not empty
Target
has rows, (equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to) Compare to (value).
Target
has characters, (equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to) Compare to (value).
Target
has a width, (equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to) Compare to (value).
Target
exists
Target
has an image id, (equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to) Compare to (value).

Actions

Anchor
Target(item tag name), (to right of, to left of), Pin to(item tag name), offset by, Offset(distance between items)
Swap Image
Target(item tag name), to image id, (Image Id)
Erase
Target(item tag name)
Move To
Target(item tag name), to, Move X, Move Y
Change Color to
Target(item tag name), to color (Color)
Change Font to
Target(item tag name), to font, (Font Name)
Change Text to
Target(item tag name), set text to (text)
Auto Fit text
Target(item tag name)

Add new Rule Group + Rules

  1. From your PrintNow admin, go to Editor/Rules Engine.
  2. To assign a new rule group click “+ Add New Rule Group” button on the top left of your screen.
  3. Add Rule Group Name to define your rule group.
  4. Start by clicking the "+" button next to your first condition.
  5. Enter the target "tag name" of the item and your condition. 
  6. Continue to add more conditions if required for your rule to fire.
  7. Click the "+" button next to Actions to define what your rule will do.
  8. Define the type of Action.
  9. Enter the "tag name" and required fields based on the type of action you selected.
  10. Click Save.
  11. Test your rule.

*You can click the "Code" view to see how your rules are saved

[
  {
    "name": "Anchor text",
    "description": "Credentials after name",
    "conditions": [
      {
        "modifier": null,
        "target": "credentials",
        "property": "exists",
        "comparison": "=",
        "compareTo": 0,
        "children": []
      }
    ],
    "actions": [
      {
        "type": "anchor",
        "target": "credentials",
        "imageId": null,
        "moveX": null,
        "moveY": null,
        "pinTo": "name",
        "pinSide": "to right of",
        "pinOffset": ".125",
        "text": "",
        "color": null
      }
    ]
  }
]

Related topics

Adobe IDML Templates
Products
{{mustache}} logic
Rules Engine
Autofill Profiles

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.