Skip to content

BLL Functions

Arie J. Godschalk edited this page Nov 15, 2026 · 2 revisions

Custom functions

Method reference · Examples · App settings

Save JavaScript functions in BLL settings and call them by name from BLL expressions in supported apps. This lets several Flows reuse a calculation or text transformation.

Create and use a function

  1. Open BLL app settings, select Functions, enter double and add it.
  2. Edit the new entry.

Save this function under the double entry:

(function (value) {
  return value * 2;
})
  1. Use double(4) in Execute BLL-expression (as Tag). Its number tag is 8. Or use Double: {[ double(4) ]} in supported text.

The function name is configured in the settings list. The code defines the parameters and return value. Deleting or changing it can affect every Flow or app that calls it; check dependencies and test changes.

More examples

Create each function under the name shown, then save its function definition.

Convert Celsius to Fahrenheit

Name: toFahrenheit

(function (celsius) {
  return celsius * 9 / 5 + 32;
})

toFahrenheit(20) returns 68. For a formatted message use Temperature: {[ number(toFahrenheit(20), 1) ]} F.

Join non-empty names

Name: joinNames

(function (names) {
  return names.filter(name => name.trim() !== "").join(", ");
})

joinNames(["Kitchen", "", "Garden"]) returns Kitchen, Garden. This example expects an array of strings.

Split text into parts

Name: split3words

(function (s) {
  const words = s.split(" ");
  return { words: words, splits: [words[0] + " " + words[1], words[2]] };
})

JSON.stringify(split3words("hello there friend")) returns JSON containing the first two words together and the third separately. This example expects three space-separated words; validate inputs that may differ. It is adapted from the community example.

Add to a list

Name: appendItem

(function (items, value) {
  items.push(value);
  return JSON.stringify(items);
})

appendItem(["apple", "pear"], "plum") returns JSON text ["apple","pear","plum"]. If input is JSON text, parse it first and handle invalid JSON. The community discussion also illustrates an append function.

Safety and debugging

Only save functions you trust. Do not construct code from untrusted input or put secrets in shared Flow examples. If a function is not found, check its saved name and spelling, and test it first in an expression-only card. Check the result's type before using a corresponding tag.

The following settings screenshot is from the BLL users topic, post 2; the layout may differ in newer versions:

BLL functions settings, showing a list of custom functions

Historical settings screenshot: saved custom functions are listed in BLL.

BLL custom function editor

Historical settings screenshot: the editor shows a function's source.

Clone this wiki locally