Block - Condition in table rows

Hi everyone, here to show you how to trigger the value changing in table rows by 1 or many condition(s) through automation block.

Let’s take a sample scenario in Backend module, we have a table information call “Details” with some item rows inside.

Information structure:

  • Module: Backend
  • Information: Details (Table)
    • Column inside:
      • No
      • Product Code
      • Quantity
      • True
      • Select (Admin, Technician)

Base the information above, we want to make the item’s Product Code can auto set the specific value when we tick True checkbox in related item inside to do triggering.

The trigger will pass through the condition(s) checking to decide the value of Product Code should be “False”, “Technician” or “Admin”.

Create an Activity

  1. In Backend module, go to Activity.
  2. Click “+ Add” to create an new activity.
  3. Set activity name “Activity D”, click “+” in Form tab, add “Details” information in form design

Set Automation

  1. Go to below, open Automation toggle
  2. There is the automation flow design:
  3. Drop 1st Condition from Tools, set #Form#Details.Count > 0
    image
  4. Drop For from Tools, set #Form#Details to loop the row in Details table.
    Below “each”, click pencil icon may rename the row variable name, we set it “item
    image
  5. Drop 2nd Condition from Tools, set #item#Quantity > 0
    image
  6. Under true path, drop Actions from Tools and make it link with 1st Condition above
    image
  7. In Actions, click “+ Add Action” then select Basic > Set action
  8. In Set Action, fill in:
    Variable: #item#Product Code
    Value: “Quantity > 0”

    Then click “:heavy_check_mark: OK
  9. For false path under 2nd Condition, drop 3rd Condition from Tools,
    set #item#True is False and #item#Quantity <= 0
    image
  10. Under true path of 3rd Condition, drop Actions from Tools and make it link with 3rd Condition
    above
    image
    “+ Add Action > Basic > Set”
    Set Action:
  11. For false path under 3rd Condition, drop 4th Condition from Tools,
    set #item#True is True and #item#Quantity <= 0 and #item#Select == “Admin”
    image
  12. Under true path of 4th Condition, drop Actions from Tools and make it link with 4th Condition
    above
    image
    “+ Add Action > Basic > Set”
    Set Action:
  13. For false path under 4th Condition, drop Actions from Tools and make it link with 4th Condition
    above
    image
    “+ Add Action > Basic > Set”
    Set Action:

#automation #block