<turbo-stream action="update" target="wiki_card"><template>
<h1>CASE</h1>
<p>The ##CASE formula is used to evaluate an input value against a series of cases (conditions) and return a corresponding result. It's similar to a <strong>switch-case</strong> statement in programming or a series of <strong>if-else</strong> conditions, providing a compact and readable way to map values.<br><br>The syntax would be : <strong>##CASE (fields, value1, result1, value2, result2, default result)</strong>;<br><br></p><p><strong>Example:<br><br></strong><br></p><pre>##CASE("Departmentcode", 'East', 1, 'Vest', 2, 'North', 3, 99)</pre><p><br></p><p><strong>Formula breakdown:</strong></p><ol><li><strong>"Departmentcode"</strong>: The value being evaluated (e.g., a department code string).</li><li><strong>Cases and Results</strong>:<ul><li>'East' → 1</li><li>'Vest' → 2</li><li>'North' → 3</li></ul></li><li><strong>Default Result</strong>: 99 (returned if none of the cases match).</li></ol><p>The ##CASE formula can be also used in combination with other formulas such as ##DBLOOKUP, #ISEMAIL, #ISPHONE, etc. Here are a couple of additional examples:<br><br><br></p><pre>##CASE(ISEMAIL("E-Mail"),1,"E-Mail",SKIPFIELD())</pre><pre>##CASE(ISPHONE(PrimaryContactPhone),1,PrimaryContactPhone,SKIPFIELD())</pre><p><br></p>
</template></turbo-stream>

<turbo-stream action="replace" target="meta_description"><template><meta content='CASE' id='meta_description' name='description'></template></turbo-stream>
<turbo-stream action="replace" target="meta_keywords"><template><meta content='CASE' id='meta_keywords' name='keywords'></template></turbo-stream>
<turbo-stream action="update" target="meta_title"><template>CASE - MyRapidi Wiki</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
