Plugin : Counter

Author:Rex.Rainbow

Download

Properties

Domain

  • The root location of the Firebase data.

Sub domain

  • Sub domain for this function.

Initial

  • Initial value if counter value is null.

Upper bound

  • Upper bound of counter, "" is none. Counter value will be clamped at upper bound.

Actions

Add

Action:Try add to

  • Try add to.
    • Value ( number or string ) : Value to add. Positive or negative number, or "+10%" string based on current value.

Configure

Action:Set boundaries

  • Set initial value and upper bound. "" is none.
    • Init ( number ) : Initial value.
    • Upper bound ( number or string ) : Upper bound value. "" is none.

Custom add

Action:Try add by function

  • Try add by function.
    • Function ( string ) : Function for increasing counter.

Action:Add to

  • Try add to, used under "Condition:On custom add".
    • Value ( number ) : Value to add. Positive or negative number.

Action:Abort

  • Abort current action, used under "Condition:On custom add".

Domain

Action:Set domain

  • Set domain ref.
    • Domain ( string ) : The root location of the Firebase data.
    • Sub domain ( string ) : Sub domain for this function.

Set

Action:Force set to

  • Force set value, it will cancel any pending adding action.
    • Value ( number ) : Value to set.

Update

Action:Start

  • Start update.

Action:Stop

  • Stop update.

Expressions

Add

Expression:LastWroteValue

  • Get my last wrote value. Valid under "condition:On my writing".

Expression:LastAddedValue

  • Get my last added value. Valid under "condition:On my writing".

Counter

Expression:LastValue

  • Get last value. Return Init value if last value is null.

Custom add

Expression:CustomAddIn

  • Get current value, used under "Condition:On custom add".

Conditions

Add

Condition:On my writing

  • Triggered when my writing successfully.

Condition:Compare my last wrote value

  • Compare my last wrote value.
    • Comparison ( cmp ) : Choose the way to compare my last wrote value.
    • Value ( number ) : The value to compare my last wrote value to.

Condition:Compare last counter value

  • Compare last counter value.
    • Comparison ( cmp ) : Choose the way to compare last counter value.
    • Value ( number ) : The value to compare last counter value to.

Condition:On my writing abort

  • Triggered when my writing abort.

Condition:On my writing error

  • Triggered when my writing error.

Custom add

Condition:On custom add

  • Custom add function.
    • Function ( string ) : Function for increasing counter.

Update

Condition:On update

  • Triggered when counter updated.