How YunFengDie’s Excel‑Like Formula Engine Powers Low‑Code Form Automation

This article explains how Ant Group's YunFengDie low‑code platform implements an Excel‑style formula system—including syntax design, variable handling, compiler, validator, and executor—to enable non‑technical users to create dynamic business rules within forms.

Alipay Experience Technology
Alipay Experience Technology
Alipay Experience Technology
How YunFengDie’s Excel‑Like Formula Engine Powers Low‑Code Form Automation
Editor’s note: The author, a former Ant Group front‑end engineer, introduces YunFengDie’s Excel‑like formula system, a no‑code/low‑code platform for building standard applications for Ant employees.
YunFengDie platform overview
YunFengDie platform overview

What Are Formulas?

When mentioning Excel formulas, most people know the simple SUM function used to calculate the sum of a range of numbers.

Excel SUM function
Excel SUM function

Excel users can use formulas to aggregate, sort, filter data, and even adjust table layouts; in short, Excel formulas inject dynamic data generation capability into static tables.

Formulas in YunFengDie Applications

YunFengDie is Ant Group's internal platform for building forms, processes, and pages without writing code, allowing business users to create and deploy forms and analyze collected data independently.

YunFengDie form building capability
YunFengDie form building capability

Example: when the applicant enters an employee ID, the applicant name field automatically displays the corresponding name.

Form building example
Form building example

Each form submission creates a new instance consisting of four fields (employee ID, name, department, reason), which can be viewed as an Excel‑like sheet.

Excel‑like example
Excel‑like example

By switching the "Applicant Name" field to "Formula Binding" and configuring a formula, the platform provides a low‑technical‑barrier data‑collection capability and enables writing dynamic business rules.

Switch to formula binding
Switch to formula binding
Formula configuration for applicant name
Formula configuration for applicant name

In short, YunFengDie offers low‑entry data‑collection abilities, and its formula system adds the capability to write dynamic business rules.

Core Requirement: Low Learning Curve

The formula system is designed for users without coding experience, emphasizing simplicity and ease of use.

Product Form

Formula Editing

Like Excel, formulas process data and output results; in the form scenario, users employ built‑in functions to write business logic for form fields.

Built‑in processing functions : handle text, numbers, complex logic, data retrieval, etc.

Form fields as variables : expose current form field values as formula parameters.

Low‑barrier logic editor : provides syntax highlighting, hints, and validation.

Formula editor
Formula editor

Formula Execution

Formulas automatically recompute when dependent variables change, similar to reactive frameworks.

Reactive formula execution
Reactive formula execution

Main Capabilities

YunFengDie’s formula features combine strengths from various platforms.

❌ Not supported   ✅ Supported   ✅💯 Excellent
Capability matrix
Capability matrix

How to Build a Formula System?

A complete formula system includes syntax, variable, and material specifications.

Formula system components
Formula system components

Specification Definition

Syntax Specification

The syntax is kept simple: binary operators (e.g., A + B) and function calls (e.g., SUM(1, 2, 3)).

Few operators : only binary operations and method calls.

Few data types : users only need to understand basic text, time, number, and collection types.

Built‑in logic : loops, branches, and data requests are abstracted as functions, hiding async concepts.

Sync/async, compute, logic
Sync/async, compute, logic

Variable Specification

Variables bridge the formula system and business logic, defining name, schema, and compiled expression.

Variable name : business variable identifier used in formulas.

Variable schema : declares data type and structure for editor validation.

Compiled expression : defines how the variable is transformed into executable code after compilation.

Editor material and variable list
Editor material and variable list

Material Specification

Materials are the core extensibility of the formula system; complex platform logic can be encapsulated as functions for user consumption.

USERINFO function example
USERINFO function example

Basic definition : function name, description, documentation, examples displayed by the editor.

Type definition : parameter and return type definitions used for validation and editor hints.

Implementation : internal logic executed by the runtime engine.

Capability Implementation

Compiler

Regardless of the formula syntax, it must be compiled into executable code; YunFengDie uses an AST and Antlr to translate formulas into JavaScript.

// User formula: IF(变量A = "单凉", USERINFO("单凉", "work_id"), "000000")
IF(变量A = "单凉", USERINFO("单凉", "work_id"), "000000")

// Compiled output:
IF(
  doCalc(vars.A1234, "===", "单凉"),
  await USERINFO("单凉", "work_id"),
  "0000"
)

The compiler traverses the AST, converts special syntax nodes, and generates the target code text.

AST to code conversion diagram
AST to code conversion diagram

Validator

The validator checks each AST node against defined schemas, such as function signatures and variable types.

Validation result
Validation result

Executor

After compilation, the executor injects variable and function values into the runtime environment to obtain results, and uses a reactive mechanism (e.g., Proxy) to re‑execute formulas when inputs change.

// Variable A changes from 1 to 10
1 => 10
// Configured formula: f(x) = A + 5
6 => ???
Reactive execution principle
Reactive execution principle

Business Integration

When business systems need non‑developers to write dynamic rules, define business‑side functions (e.g., e_search, e_set), build variable lists, and generate runtime code (e.g., Java) using the formula system.

Following these steps can add rule‑writing capability with minimal development effort.

frontendautomationcompilerlow-codeValidation@Formula
Alipay Experience Technology
Written by

Alipay Experience Technology

Exploring ultimate user experience and best engineering practices

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.