--- title: "Handle complex logic" slug: "handling-complex-logic" updated: 2026-09-28T06:23:24Z published: 2026-09-28T06:23:24Z canonical: "help.quickbase.com/handling-complex-logic" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.quickbase.com/llms.txt > Use this file to discover all available pages before exploring further. # Handle complex logic ## Overview FastField's **Advanced Rules** feature allows you to apply conditional logic using **if/then** statements (e.g., *If* a user selects *No,* *then* a new field will appear that asks for additional information). Advanced Rules are useful when you have complex business logic or conditions involving multiple fields. For example, Advanced Rules could be applied to an inspection form that displays specific fields based on the number of rooms being inspected. It could also assign alert colors to those fields based on input. ## How to set up Advanced Rules 1. Log into the **portal** and open your form in the **Form Builder**. 2. Select **Advanced Options** > **Advanced Rules**. ![Advanced Rules menu accessed from Advanced Options in the Form Builder](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/image(102).png?sv=2026-02-06&spr=https&st=2026-10-30T09%3A50%3A53Z&se=2026-10-30T10%3A50%3A53Z&sr=c&sp=r&sig=JC53ZNLmGwLtEh6BO1nRmtKq0xX%2FNq0EPs6wgVYk5Bg%3D) 3. In the Form Rules window, select **+ Add Rule** to create a new rule. 4. Select the **Fields, Rules and Variables...** drop-down list to choose the field you want to apply this rule to. - In this example, we've applied it to our *How many rooms to inspect?* field. 5. Choose the **evaluation type** (e.g., *Equals*, *Not Equals*, *Has Value*). 6. Specify the **value** you want to compare the field with (e.g., *1*). 7. Under **Then perform these actions**, define the actions to be performed if the conditions are met. - In this example, if the value *1* is selected for *How many rooms to inspect?*, we will show the *Room #1* text field and set its color to green. We will also hide the *Room #2* and *Room #3* text fields. 8. *Optional:* Select **+ Otherwise** to add additional conditions (learn more in the Add additional conditions section). ![Otherwise button used to add additional rule conditions](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/image(102).png?sv=2026-02-06&spr=https&st=2026-10-30T09%3A50%3A53Z&se=2026-10-30T10%3A50%3A53Z&sr=c&sp=r&sig=JC53ZNLmGwLtEh6BO1nRmtKq0xX%2FNq0EPs6wgVYk5Bg%3D) ## Add additional conditions In a similar way, you can add more conditions using the **+ Otherwise** button. Using the same example, for instance, we can create another condition for when users enter *2* instead of *1* when asked *How many rooms to inspect?* You can add as many conditions as you need. 1. Select **+ Otherwise** to create a new action. ![Otherwise button used to create a new rule action](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/image(102).png?sv=2026-02-06&spr=https&st=2026-10-30T09%3A50%3A53Z&se=2026-10-30T10%3A50%3A53Z&sr=c&sp=r&sig=JC53ZNLmGwLtEh6BO1nRmtKq0xX%2FNq0EPs6wgVYk5Bg%3D) 2. To create a multi-condition rule, select **Else If All** from the **Else** drop-down list. 3. Select **+ Add Condition**. ![Add Condition button in the Else If All rule setup](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/image(102).png?sv=2026-02-06&spr=https&st=2026-10-30T09%3A50%3A53Z&se=2026-10-30T10%3A50%3A53Z&sr=c&sp=r&sig=JC53ZNLmGwLtEh6BO1nRmtKq0xX%2FNq0EPs6wgVYk5Bg%3D) 4. Set up the new condition. ![New rule condition configured for the second scenario](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/image(102).png?sv=2026-02-06&spr=https&st=2026-10-30T09%3A50%3A53Z&se=2026-10-30T10%3A50%3A53Z&sr=c&sp=r&sig=JC53ZNLmGwLtEh6BO1nRmtKq0xX%2FNq0EPs6wgVYk5Bg%3D) - In our example, our new condition is when users enter *2* for the field *How many rooms to inspect?* 5. Define the corresponding **actions** for when the condition is met. ![Rule actions configured to show and hide fields for the second scenario](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/image(102).png?sv=2026-02-06&spr=https&st=2026-10-30T09%3A50%3A53Z&se=2026-10-30T10%3A50%3A53Z&sr=c&sp=r&sig=JC53ZNLmGwLtEh6BO1nRmtKq0xX%2FNq0EPs6wgVYk5Bg%3D) You can then repeat these steps to set up as many conditions as needed. To handle cases where no selection is made, use the **Else** condition. ![Else condition used to hide and clear colors for all room fields](https://cdn.document360.io/dd260e4e-10bb-4b66-8fb3-5504c272b904/Images/Documentation/2054c831-9f10-4dfe-8dd0-532a19e8281c_large.png?sv=2026-02-06&spr=https&st=2026-10-30T09%3A50%3A53Z&se=2026-10-30T10%3A50%3A53Z&sr=c&sp=r&sig=JC53ZNLmGwLtEh6BO1nRmtKq0xX%2FNq0EPs6wgVYk5Bg%3D) - In our example, if the user enters *2* for *How many rooms to inspect?* it will show the *Room #1* and *Room #2* text fields, set their color to yellow, and hide the *Room #3* text field. - In this example, we use the **Else** condition to hide and clear colors for Rooms #1, #2, and #3.