---
title: Using Conditional Logic & Scoring
slug: using-conditional-logic-and-scoring
docTags: 
createdAt: 2024-11-04T19:54:32.447Z
---



::embed[]{url="https://www.youtube.com/watch?v=UpJr3txDceA"}

The **Conditional Logic & Scoring&#x20;**&#x66;eature in VLX allows you to apply logic-based actions, such as scoring, flagging, and color-coding, based on responses within a specific range. This guide will walk you through setting up conditional logic for number fields in your templates.
 <font color="#ff6900">**Step 1\: Add a Number Field to Your Template**</font>

&#x9;1\.	Navigate to th&#x65;**&#x20;Templates&#x20;**&#x73;ection in VLX.
&#x9;2\.	Click on **Create Template** to start a new template or select an existing one to edit.
&#x9;3\.	Drag and drop a **Number** field into your template. This will be the field where you’ll set up conditional logic.
 <font color="#ff6900">**Step 2\: Access the Logic Settings**</font>

&#x9;1\.	Select the **Number** field to open the **Number Properties** panel.
&#x9;2\.	Go to the **Logic** tab.
&#x9;3\.	Click on **Add Logic** to begin setting up conditional actions.
 <font color="#ff6900">**Step 3\: Define Your Conditional Logic (If-Then Rules)**</font>

&#x9;1\.	In the logic setup, define your condition using the **If-Then** format:
&#x9;    •	**If \[Field Name] is \[Condition]** (e.g., “If Number is less than 50”).
&#x9;2\.	Choose from various conditions, such as:
&#x20;      **• equal to**&#xA;**&#x9;    • not equal to**&#xA;**&#x9;    • less than**&#xA;**&#x9;    • less than or equal to**&#xA;**&#x9;    • greater than**&#xA;**&#x9;    • greater than or equal to**
 <font color="#ff6900">**Step 4\: Set Actions Based on Conditions**</font>

&#x9;1\.	After defining the condition, select an action to apply when the condition is met:
&#x9;•	**Add Score**: Assign a score based on the response (e.g., add +1 point).
&#x9;•	**Flag Response**: Flag the response if it meets certain criteria.
&#x9;•	**Set Color**: Choose a color to indicate the response’s status (e.g., green for acceptable range).
&#x9;2\.	Configure each action as needed to match your inspection criteria.
 <font color="#ff6900">**Step 5\: Publish and Test Your Template**</font>

&#x9;1\.	**Publish** the template after configuring all logic conditions.
&#x9;2\.	Run a test inspection to ensure that the logic works as expected and that scores, flags, and colors apply correctly.
 <font color="#ff6900">**Example\: Temperature Check Using Conditional Logic**</font>

For instance, you might set up a temperature check as follows:

&#x9;•	**If Temperature \[is] between 65 and 75°F:**
&#x9;    • Action: Add +1 point, Set Color to Green.
&#x9;•	**If Temperature \[is not] in between 65 and 75°F:**
&#x9;    •	Action: Flag Response, Set Color to Red.
&#x9;

This setup provides inspectors with immediate feedback based on the predefined criteria, making it easy to spot acceptable and critical responses during inspections.

For a visual walkthrough, refer to our video tutorial linked above.
