Skip to main content

Rules for blocks

Add a rule to a block to show or hide it depending on field values, the person viewing the page, or their device.

Written by Leo

A rule is an if-then setting on a block. The condition (the When part) says when the rule applies, and the action (the Do part) says whether to show or hide the block. Rules are meant to help you keep forms and dashboards short and relevant.

You can use rules for many things, including:

  • Showing a follow-up question in a form only after someone selects Other.

  • Showing a dashboard section only to the people who manage a team.

The Add rule menu of the Priority field in the record layout editor, with Hide block and Show block

Note:

  • Rules work on one block at a time. Select a single block, then open its menu.

  • A hidden block still exists. Hiding a block doesn't delete it or its data.

  • This feature is only available on the Premium Plan. Learn more about plans →

Who can use rules?

  • Rules are available in forms, dashboards, and record layouts.

  • This feature is only available on the Premium Plan. Learn more about plans →

  • To add or change a rule, you need Full access to the app. In a form or dashboard app, the app has to be unlocked. In a database app, add rules to a record layout with Customize record layout. Learn more about locking and unlocking apps →

Blocks that support rules

You can add rules to field blocks, Text and headings, Link and Link to app, Image, Embed, Divider, Box, Group, Tabs and single tabs, reports on dashboards, and the submit button of a form. Rules on a box or group apply to everything inside.

Add a rule

To add a rule to a block:

  1. Open the block menu and select Rules.

  2. If the block already has rules, select Add rule. If it has none, the Add rule menu opens right away.

  3. Search with Search for an action…, then select Hide block or Show block. The new rule appears in the list.

  4. Select the new rule to open it. Under When, Tape usually adds a first condition for you. Set it up, or select Add condition if there's none yet. To nest conditions, open Add condition and select Add condition group.

  5. Check the Do part. It shows the action you chose.

Clicking the drag handle of the Priority field in the record layout editor, selecting Rules, and the Add rule menu opening with Hide block and Show block

  • Hide block hides the block when the condition is true.

  • Show block shows the block only when the condition is true.

Conditions

A condition compares something with a value. The first condition starts with Where. When you add more, pick how they combine:

  • And means all conditions must match.

  • Or means at least one condition must match.

A rule of the Priority field opened in the record layout editor of Properties, with When, the condition Where Property name Is empty, a second condition starting with And, Add condition, and under Do the action Hide block

You can base a condition on:

  • A field: in forms and record layouts, the fields of the database app. Forms don't offer Unique ID, Created on, Created by, Last edited on, and Last edited by, because a form always creates a new record. Dashboards don't offer fields.

  • Single select fields offer Is, Is not, Is any of, Is none of, Is empty, and Is not empty.

  • Status fields offer the same, plus Is completed and Is incomplete.

  • Multiple select fields offer Has any of, Has all of, Is exactly, Has none of, Is empty, and Is not empty.

  • All other field types, such as text, number, date, member, relation, and files, offer Is empty and Is not empty.

  • Current user: the person viewing the page. Choose Is any of or Is none of, then pick people or groups in Select people or groups. This is how you build personal dashboards. Under General, you can also pick a role:

  • Workspace admins and Workspace members of the app's workspace.

  • Guests of your organization.

  • Visitors: anyone on the web with a published link. For example, hide internal notes with Current user Is any of Visitors.

  • Device: Is or Is not Desktop or Mobile. Tape checks the type of device, not the size of the window.

  • Record state: only in record layouts. Is or Is not During creation while a record is still being created, or After creation once it exists.

Rules update as soon as values change, so a follow-up question appears while the person fills out the form.

Open the menu of a condition to Duplicate or Remove it.

Edit or delete a rule

Open the block menu, select Rules, and select the rule to change it. To delete it, select Delete. Tape removes the rule right away, without asking you to confirm.

FAQs

Is a required field still required when a rule hides it?

No, Tape only checks the fields people can see. A required field that a rule hides doesn't stop people from submitting the form or creating the record.

Can I use rules in a public form?

Yes, rules run for people who fill out a published form too. People who aren't signed in never count as one of the people or groups in a Current user condition.

Can I add a rule to more than one block at once?

No, rules work on one block at a time. To control several blocks with one rule, put them in a box or group and add the rule to it. Learn more about box, group, and tabs →

Can I use rules to hide an option inside a select field?

No, rules show or hide whole blocks.

Can I use a rule to keep a field private?

No. Rules only decide what is shown on the page, not who can see the data. To decide who can see or edit a field, use field access. Learn more about field access →

Do I need a rule to hide empty fields?

No. Use the display options of the field, such as Hide when empty or Show after creation. Use a rule when it depends on something else, like another field, the device, or the person viewing. Learn more about field visibility →

Are there other blocks I can use?

Yes! There are blocks for text and headings, images, embeds, links, columns, boxes, groups, and tabs. See how blocks work in Blocks →

Still have more questions? Find answers and get help from community experts in the Tape community →.

Did this answer your question?