Skip to content

Commit 742fb53

Browse files
authored
Added info on custom expression to compare values in a variable (#535)
1 parent f450cb2 commit 742fb53

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/4. Product Features/03. Flows/2. Flow Actions/Split By/01. Custom Expression.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<tr>
55
<td><b>4 minutes read</b></td>
66
<td style={{ paddingLeft: 40 }}><b> Level: Intermediate</b></td>
7-
<td style={{ paddingLeft: 40 }}><b>Last Updated: October 2025</b></td>
7+
<td style={{ paddingLeft: 40 }}><b>Last Updated: December 2025</b></td>
88
</tr>
99
</table>
1010
</h3>
@@ -139,6 +139,17 @@ In the given example, the regex used is:
139139

140140
<img width="582" height="400" alt="Screenshot 2025-10-08 at 4 59 57 PM" src="https://github.com/user-attachments/assets/6f345f13-af10-43fa-9a3d-759794c60523" />
141141

142+
### 10. Comparing the values contained in variables.
143+
144+
Example `<%= case "@results.assigned_arm_id" do "@results.control_arm_id" -> "Control"; "@results.treatment_arm_id" -> "Treatment"; end %>`
145+
146+
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`.
147+
148+
The expression creates two categories "Control" and "Treatment", like shown in the screenshot
149+
150+
<img width="1360" height="1100" alt="image" src="https://github.com/user-attachments/assets/5b87521c-2acb-4892-8229-177d156009f4" />
151+
Similar syntax can be used to check for multiple variables.
152+
142153
---
143154

144155
## Advanced Syntax Examples

0 commit comments

Comments
 (0)