From 89927293819ad6cb48edf0e82d0d5da4b4a9f199 Mon Sep 17 00:00:00 2001 From: Tejas Mahajan <141305477+mahajantejas@users.noreply.github.com> Date: Wed, 24 Dec 2025 14:09:29 +0530 Subject: [PATCH] Added info on custom expression to compare values in a variable --- .../Split By/01. Custom Expression.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/4. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md b/docs/4. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md index cec9934338..bf6d7c6028 100644 --- a/docs/4. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md +++ b/docs/4. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md @@ -4,7 +4,7 @@ 4 minutes read Level: Intermediate - Last Updated: October 2025 + Last Updated: December 2025 @@ -139,6 +139,17 @@ In the given example, the regex used is: Screenshot 2025-10-08 at 4 59 57 PM +### 10. Comparing the values contained in variables. + +Example `<%= case "@results.assigned_arm_id" do "@results.control_arm_id" -> "Control"; "@results.treatment_arm_id" -> "Treatment"; end %>` + +This syntax enables to split based of if value in `@results.assigned_arm_id` matches either the value of present in `@results.control_arm_id` or `@results.treatment_arm_id`. + +The expression creates two categories "Control" and "Treatment", like shown in the screenshot + +image +Similar syntax can be used to check for multiple variables. + --- ## Advanced Syntax Examples