Getting Started - Automation

Automation Block

What is Automation Block?

Automation Block is a UI feature that automates tasks within or across modules. Using the automation block, the data can be updated automatically. This is done to minimize manual update of relevant records.

4 Block Tools:

  1. Actions → process of doing something automatically
  2. Condition → check/compares the value
  3. For → used to repeat a specific block of code a known number of times
  4. Trigger → trigger when something changes

7 Basic Element under Actions:

  1. Perform → Submit an activity
  2. Find → Find an entry that meets the condition
  3. Find All → Find more than one entry that meets the condition
  4. Form → Retrieve a form
  5. Error → Display error message to end user
  6. Create → Create a new Variable
  7. Set → Set Value to a Variable

Components:

  1. Form → information within the form

Show only the information in the from

  1. Entry → Show list of information from the Module

  1. CURRENT USER → system captures login user
  2. TODAY → current date
  3. NOW → current date and time
  4. If…else… → to execute both the true part and the false part of a given condition. If the condition is true, the if block code is executed and if the condition is false, the else block code is executed.

If (condition):
#Executes this block if the condition is true

else:

#Executes this block if the condition is false

  1. Or → Logical operator that evaluates as True if any of the operands is True
  2. and → Logical operator that returns True if both the operands are true
  3. condition → compares the value or equality of two objects

For e.g.

  1. sum (list / table) → the total amount or number
  2. filter (list / table) → filter information that meets the condition
  3. find (list / table) → find an information that meets the condition
  4. addRow (table) → add table row with values
  5. removeRow (table) → remove specific table row
  6. sort (list / table) → sort information by ascending or descending order
  7. group (list /table) → group the information

Before executing

  1. Set Value within the form
  1. Perform Activity at another Module
    Block - Perform Activity at another Module using Before Submission
  2. Prompt Alert Message
    Block - Prompt Error Message Before Submission

After executing

  1. Perform Activity to another Module
    Block - Perform Activity at another Module using Before Submission

Sample Scenario

Scenario: To trace the record of money that has moved in and out of your account.

Setup Modules

Module 1: Transfer In → get fund into the account
Module 2: Transfer Out → get fund out from the account
Module 3: Transaction → trace the movement of the funds

Automation for Transfer In

  1. Go to Module 1: Transfer In > Basic (Create) > New Automation > Do after

Note:
Type = Type of Transaction(Transfer In)
Before Amount = The opening/balance amount (Opening amount)
Debit Amount = Amount that Transfer In
Current Amount = The Latest Amount (Before + Debit)

When performing Create do Automation

  1. Do after

  1. Select Find All under Action Tool
  2. Select ‘Module’: Transaction
    Find the Transaction Module first to get the current amount
  3. Click OK

  1. Condition Tool
  2. Type #Transaction List Found
    to indicate if the transaction is not None

If True:

  1. Select Create under Action Tool
    Variable:findLatestfind the latest balance amount
    Value: sort(#Transaction List Found #Document ID, ‘descending’)[0]sort by Document ID to get the latest Transaction. [0] → take the first row value

  1. Click + Add Action
  2. Select Perform
  3. Select Module:Transaction
    Select Activity: Create

Click Expand Property
Select Before Amount: #findLatest #Current Amount
Pass the opening/balance amount from the account

Select Type: ‘Transfer In’
To indicate the transaction is from Transfer In

Select Debit Amount: #Entry #Amount
Select Current Amount: #findLatest #Current Amount + #Entry #Amount
Select Reference No.: #Entry #Reference No

If False:

  1. Select Perform
  2. Select Module: Transaction
    Select Activity: Create

Click Expand Property
Select Before Amount: 0
No transaction from this account
Select Type: ‘Transfer In’
Select Debit Amount: #Entry #Amount
Amount that Transfer In
Select Current Amount: #Entry #Amount
Select Reference No.: #Entry #Reference No
13. Click OK
14. Click Save

Result for Transfer In

Automation for Transfer Out

  1. Go to Module 2: Transfer Out > Basic (Create) > New Automation > Do after

Note:

Type = Type of Transaction (Transfer Out)
Before Amount = The previous balance amount
Credit Amount = Amount that Transfer Out
Current Amount = The Latest Amount (Before - Debit)

When executing Create do Automation

  1. Do after

  1. Select Find All under Action Tool
  2. Select ‘Module’: Transaction
    Find the Transaction Module first to get the current amount
  3. Click OK

  1. Condition Tool
  2. Type #Transaction List Found
    to indicate if the transaction is None

If True:

  1. Select Create under Action Tool
    Variable:findLatest
    Value: sort(#Transaction List Found #Document ID, ‘descending’)[0]sort by Document ID to get the latest Transaction. [0] → take the first row value

  1. Click + Add Action
  2. Select Perform
  3. Select **Module:**Transaction
  4. Select Activity: Create
    Click Expand Property
    Select Before Amount: #findLatest #Current Amount
    Pass the opening/balance amount from the account

Select Type: ‘Transfer Out’
To indicate the transaction is from Transfer Out

Select Credit Amount: #Entry #Amount
Select Current Amount: #findLatest #Current Amount - #Entry #Amount
Select Reference No.: #Entry #Reference No
6. Click OK
7. Click Save

Result for Transfer Out

Alert for Account is insufficient or not found

  1. Go to Module 2: Transfer Out > Basic (Create) > Automation > Do before

When executing Create do Automation

  1. Do before

  1. Select Find All under Action Tool
  2. Select ‘Module’: Transaction
    Filter:
  • Click + add condition
  • Select Current Amount greater than or equal min 1
  1. Click OK

  1. Condition Tool
  2. Type #Transaction List Foundto indicate if the transaction is not None

If False:

  1. Select Error under Action Tool

Type: ‘Insufficient Amount’

  1. Click OK
  2. Click Save

Result for Alert

1 Like