Repository navigation
BLL Coding
Home · Advanced Virtual Device · Examples
Better Logic Library (BLL) adds expressions to selected Advanced Virtual Device (AVD) text inputs and reflection settings. Basic virtual devices, ordinary Flow tokens and plain-text fields do not need BLL.
Install Better Logic Library and create an AVD. Create and save the field you want to update. For reflection from BLL variables, enable the BLL source in app settings.
| Where you enter the expression | Format |
|---|---|
| Set Text action's Text input | Text containing {[ ... ]}. |
| Set List from text action's Value input | Text containing {[ ... ]} that produces an option ID. |
| Set Expression with Better Logic Library action | A bare expression, without {[ ]}. |
| A field's reflected-value BLL expression | A bare expression using the context shown in the repair screen. |
The separate JavaScript Set Expression card is not the BLL expression card. Other inputs, such as numeric fields or option dropdowns, are not automatically decoded as BLL text.
-
Create and save a Text field named
Last update. -
Add the AVD's Set Text action to a test Flow. Select that device and field.
-
Enter this in Text:
Updated at {[date("HH:mm")]}. -
Choose Nothing else if you only want to update the field, then run the Flow. The field should show the current time.
This changes the text when the Flow runs; it is not a continuously updating clock.
Use Set Expression with Better Logic Library and select a saved Text field. Enter this bare expression:
"Ready"
Run the Flow. The field should display Ready. Choose a result type that
matches the destination field. This action writes the field and does not
provide a result token.
For a List field, the evaluated value must match an option's case-sensitive ID, not its displayed title. See Set List from text and custom lists.
Reflection can supply context such as $value for one source or $values
for several sources. Use only the variables shown for your selected source.
For example, a reflected fraction of 0.35 can become 35 with:
$value * 100
Do not put {[ ]} around a bare reflection expression. Check the source's
type and unit before applying the calculation; not every device reports a
percentage as a fraction.
Follow reflection and React and field configuration for setup, multiple-source calculations and missing readings.
Check that BLL is installed and running, the field is saved, the correct card is selected, and you used the format shown above. Try plain text first to verify the destination. Expression evaluation, writing the AVD field and controlling a real device are separate steps.
See BLL's Device Capabilities examples and BLL coding for more expressions and formatting options.
Support development - If Device Capabilities is useful to you, you can support its
continued development through GitHub Sponsors,
Patreon,
PayPal, or
bunq.
Thank you!