Blocworx Documentation
  • Welcome to Blocworx
  • The structure of Blocworx
    • What is a project?
  • Getting Started
  • How To's
    • How To's
      • Get Started: Build a Simple Module
      • Build a simple invoicing system
  • Page
    • Page Overview
      • Page Sections
      • Modules in Pages
      • Sub Pages
      • URL Links
    • Edit a Page
    • Manage Pages
  • Module
    • Module Overview
      • Module Sections
      • Blocs in Modules
      • Automated Reports
    • Module Editor
      • Add, remove and move Sections and Blocs
      • Edit Module Location & Icon
      • Edit Module Details
      • Import from another Module
      • Delete a Module
      • Make this module available to child instances
    • Manage Modules
  • Bloc
    • Bloc Overview
    • Bloc Front End Overview
      • Data Display
      • Advanced Reports
    • Bloc Editor Overview
    • Pdf & Doc File Template Builder
    • The Blocworx Process Flow
    • Edit Templates
  • Bloc Editor
    • Bloc Form Builder Preview
    • Fields, Tools and Charts
      • Standard Input Fields
        • QR Code
        • Text
        • Large Text Field
        • Checkbox
        • Multi Button
        • Dropdown from List
        • Date/Time Selector
        • Bluetooth (Beta)
        • Button
      • File & Image Fields
        • File Field
        • Multi File Field
        • Image URL Field
      • Linked Data Selection Fields
        • Dropdown from Bloc
        • Autocomplete
        • Radio Buttons From Bloc
        • Checkboxes From Bloc
        • Link Data Field
      • Content Editing Components
        • HTML Field
        • Separator Field
        • Content Editor For User (WYSIWYG)
        • Content Editor (WYSIWYG)
      • User Based Components
        • Create User Pop Up
        • Logged in Users Information
        • User Select Field
        • Signature & Authentication
      • Dynamic Output & Variable Components
        • Time/Date Difference
        • Auto Generate Field
        • Plain Data Field
        • Maths Field
        • Field Merge Builder
        • Label Field
        • Barcode Generator
      • Third Party Integration Components
        • Blocworx Gateway
        • Bartender Integration
        • File Builder
        • Mindee API
      • Charts, Results & Data Feeds
        • Local Data Doughnut Chart
        • Advanced Chart Set 1
        • Results Box
      • Sub Blocs, Tools & Components
        • Submit Button
        • Sub Bloc
        • Cross-Bloc Data Manipulator
        • Bloc List
        • Mail Alert
        • Calendar & Resource Planning
    • Field Create, Edit, Parameters, Rules and Actions
      • Creating a Field
      • Editing a Field
      • Field Parameters
        • Choose hidden options for this field
        • Mobile Configurations
        • Rule and Actions Based Parameters
        • Main Field Parameters
        • Conditional Value
        • Set Character View Limit
        • Conditional Visibility
        • Dynamic Data Update (Update Value Based On Another Date Field)
        • Field Names in Different Languages
        • Manage Field Actions
        • Load Data from Another Bloc
      • Field Rules and Actions
        • Can not be empty
        • Must Be Equal To
        • Cannot Be Equal To
        • Must be Between Two Values
        • Must be at least X number of characters
        • Must be exactly X number of characters
        • Item must have been entered elsewhere
        • Item must not have been entered elsewhere
        • A specific value is required elsewhere
        • A specific value cannot be present elsewhere
        • Populate another local field with data from elsewhere
        • Populate another local field with total from elsewhere
        • Max Allowed Duplicates
        • Can only be numbers/integers
        • Keep Data for Next Entry
        • Must be Certain Format
        • Cannot be Equal Another Local Field
        • Must be equal to another local field
        • Populate another local field with part of this field
        • Populate local field with data from another local field
        • Must have matching equivalent data in another form
    • Bloc Settings
      • Main Bloc Settings
      • Functional Behaviour Settings
      • Bloc Layout and Visibility Settings
      • Data Display Settings
      • User Restricted Data Settings
      • Manage and Build Templates
      • Bloc, User and Role Access
      • List of available Field Slugs
      • Manage Bloc Scheduler
  • Manage Data
    • Manage Data Overview
    • Raw Data and Counting Reports
    • Look Up/Edit Data
    • Find and Replace Data
  • Administration
    • Admin & Development Overview
    • Manage Users
      • Profile Filter
    • Roles & Permissions
      • Roles
      • Permissions
    • Manage Mail Alerts
  • App Settings
    • Sign In With Google
    • Timeout Setting
  • No Code Development
    • Manage Blocworx Instances
      • Parent and Child Instances
    • Edit Theme
    • Manage Modules
    • Manage Pages
    • Extra and Beta Features
Powered by GitBook
On this page
  • What is a rule?
  • How to add a rule to a field
  • How to trigger a rule
  • Response Types & Response Data
  • Rule Response Data
  • Custom Rule Response
  • Multiples Rules and Rule Order
  • Rules vs Actions

Was this helpful?

  1. Bloc Editor
  2. Field Create, Edit, Parameters, Rules and Actions

Field Rules and Actions

PreviousLoad Data from Another BlocNextCan not be empty

Last updated 1 month ago

Was this helpful?

Field Rules and Field Actions fall under the same category. Their differences are minor in our current version of Blocworx. For the sake of the documentation we will only use the term "Rule".

Rule=ActionRule = Action Rule=Action

For more information on

What is a rule?

A rule is a piece of activity that occurs when data inside a field changes and when the form is submitted. You can set this piece of activity and you can decide if its a rule that can or cannot be broken.

Our most basic and easy to understand rule is the following: Cannot Be Empty This rule simply forces to user to fill data into a field. If they attempt to submit a form with a field that has this rule, and the field is empty, the rule will break.

A more advanced rule would be Populate local field with part of this field In this rule, once the data in the field is entered another local field gets populated with a part of the data in this field that you will have predefined in the rule parameters.

How to add a rule to a field

To do this, having , you simply hover over that field and click "Rules". This will open the right hand sidebar and will bring you straight to the rules.

How to trigger a rule

The way rules are triggered can vary slightly depending on the type of field. On Text or Large Text fields, rules get triggered when you hit enter or tab on the keyboard (or if a scanner has been programmed to do this). On button/click type fields they get triggered when you click. In other fields they get triggered simply when the value in the field changes.

Response Types & Response Data

You can choose the type of response the rule gives back when triggered.

Red Warning Reject

Red Warning Rejects completely disallow you to submit the form. It also clears the data from the field.

Yellow Warning Accept

The Yellow Warning Accept options allows the user to continue and does not delete the data.

No Warning Accept

Visually this option means nothing happens on the screen and you can continue. Why have this option at all? Because of the next feature in rules, which is Rule Response Data. Sometimes we may want to get a response from a rule and fill certain fields with certain values based on whether a rule passes or not.

Rule Response Data

Using this feature, we can populate certain fields on our Bloc depending on the outcome of the rule.

Populate Other Field Data on Rule Passing

If the rule is not broken then we can opt to add values to other fields.

Populate Other Field Data on Rule Failure

If the rule is broken then we can opt to add different values to other fields.

Custom Rule Response

Each Rule has a default Blocworx built-in response message depending on the rule. However sometimes these responses might seem a bit technical or may not make sense to a user in the context of the form. For this reason you can set your own custom responses.

Multiples Rules and Rule Order

You can add as many rules to a field as you like. The order in which they are executed are determined by the rule order. It is important to note that all rules get processed even if one breaks. This is to allow you to carry out more than just one activitiy on a field. The rule order can be used for instant to check multiple blocs for different data and if they all contain response data, the last rule which has response data will be the one that is used.

Rules vs Actions

As our software got more advanced, and as our rules got more advanced beyond simply checking data and passing/failing rules, we started putting more features and more settings into existing rules, for example: Populate another local field with total from elsewhere

This rule has the ability to count data in various ways in other blocs (or even the same bloc) and give back this data as a numeric quantity. It can even check the data in more advanced ways by handling more criteria for counting. A rule like this is closer to being an "Action" rather than a rule.

In the future, we will be officially splitting the rules from the actions, allowing us to add even more features to just one while not adding it to another.

created a field
Rules vs Actions click here to get to bottom of the page.
A Red Warning Reject
Yellow Warning Accept
A typical automatic default Blocworx rule response
Here is the same rule but with a custom response.