Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
namescreen
nopaneltrue

Page Under Construction - Introduction

Mandatory Fields using _field.value

Introduction

Validation can be added to specific fields to check data as it is entered and before completing an Actionflow. Examples of validation include, checking if a field:

  • has been completed
  • contains certain numbers, letters or special characters
  • is in a desired format, e.g. a website or email address
  • and more...

Mandatory Fields

Go back to the Company Form and add a CSS property to the shared style, Mandatory Fields, which applies the
  1. Open the Companies Form screen from the screen's home page. This ensures there is no data selected.Click .
  2. Ensure your screen is
    Insert excerpt
    _unlock
    _unlock
    nopaneltrue
    ed.
  3. Double -click on the Company Name field to open its properties. Ensure your screen is unlocked.Add a Formatting Rule:
  4. Rule Expression, _field.value == _NULL
    1. This expression will evaluate to true when this field is null.
  5. Click its 
    Insert excerpt
    _property_tabs
    _property_tabs
    namestyle
    nopaneltrue
  6. Click on the 
    Insert excerpt
    _
    addIcon
    property_tabs
    _
    addIcon
    property_tabs
    nopaneltrue
     next to Style.
    1. We will create a style to highlight the field if the rule expression is true. Set the options how you feel are appropriate to highlight the field. Here is an example setup: 
      1. Name, Mandatory Fields.
      2. Text Colour field, #d0021b.
      3. Font Weight field, Bolder.
      4. Save your changes
  7. The style is added to the Formatting Rule.
    1. If there is an existing style to be used, this can be selected from the dropdown.
  8. Save your changes.
  9. In the Validation section:
    1. Insert excerpt
      _check_box_tick
      _check_box_tick
      nopaneltrue
       Mandatory and toggle it on 
      Insert excerpt
      _toggle_on
      _toggle_on
      nopaneltrue
  10. Insert excerpt
    _save
    _save
    nopaneltrue
     your changes
  11. Close and reopen the Companies Form to ensure the new formatting rule is applied.Lock the
  12. Insert excerpt
    _lock
    _lock
    nopaneltrue
     the screen. Now the field label is red.
    1. Image Removed
  13. Notice when you move your mouse over the field the label changes colour. We will look at this in the next section.

Exercise

  1. has an asterisk.
    1. Image Added

Exercise

  1. On your Companies Form, click on the Company Name field header
    1. Note: You may need to click on it twice to ensure the
      Insert excerpt
      _property_settings
      _property_settings
      nopaneltrue
       that opens is for Static Text
  2. On the
    Insert excerpt
    _property_tabs
    _property_tabs
    namestyle
    nopaneltrue
    , add a CSS property, which applies a red text colour when the mouse moves over the Company Name
field.
  1. header
    1. CSS Tag: color
    2. Value: red
Expand
titleShow me how

Image Added

Image Added