Skip to main content
Question

Formula for form fields

  • Apr 18, 2025 10:32 AM UTC
  • 3 replies
  • 127 views

Forum|alt.badge.img+3

Hi want to write a formula to show and hide fields on a form which is in Table 3.

Table 1 has one to many relation ship with Table 3. (not sure if it even matters)

Table 2 has one to many relation ship with Table 3(not sure if it even matters)

So few questions on this?

  1. Do i write this formula in Table3 - Advance Settings > Build custom data rules for this table: > in this field?
  2. How do i control where these fields will show up on the form and alignment ?
  3. How do i hide all fields initially, just remove them from the form ?
  4. Also Table3_Form_Field1 = will be selected by the user when they create a new record in Table3 so is this going to work dynamically or i need to use the dynamic form rules only instead?
  5. If the formula will do the job then, Is this the right formula structure?

3 replies

Forum|alt.badge.img+3
  • Author
  • Qrew Member
  • Apr 18, 2025 10:35 AM UTC
  1. If the formula will do the job then, Is this the right formula structure? below is the formula

If (

[Table3_Form_Field1] = "Value1",

Then show [Table1_Field1], [Table1_Field2],

else if (

[Table3_Form_Field1] = "Value2" or "Value3",

Then show [Table2_Field1], [Table2_Field2],


Forum|alt.badge.img+14
  • Qrew Corporal
  • Apr 18, 2025 12:38 PM UTC

Actually you could do either; since these are lookup fields.

FORM RULE with HIDE/SHOW solution: 

Your rule will look like this:

When

[Table 3 Field 1] = "value 1"

then

show [table 3 field 1]

hide [table 2 field 1]

hide [table 2 field 2]

This logic means that when the table 3 field 1 SHOULD be visible; then it will be and under all other conditions it will be hidden.  Conversely by adding the hide table 2 field 1 and 2; you're saying that when table 3 field 1 SHOULD be visible, then the other 2 fields should not be visible.  So when table 3 field 1 is not visible the other table 2 field 1 and 2 WILL be visible.

 

FORMULA:

If( [table 3 field 1] = "value 1", [table 3 field 1], [table 2 field 1] & " " & [table 2 field 2])

(this assumes your table 2 field 1 and 2 should be displayed "together" in a single field.  Also, this formula will "persist" across the entire table which would include reports, forms, formulas and emails etc.  So this might be a better solution that one simple form rule that only exists in that one state.  Using this formula in this way you can turn off reporting for the 3 lookup fields and rely only on this one formula.


Top Step
Forum|alt.badge.img+12
  • Observing
  • Oct 28, 2026 8:52 PM UTC

That custom data rules box is for validation. It checks values when the record saves and shows an error, so it won’t show or hide anything. Dynamic form rules are the right tool, and they react live as the user picks a value.

First, the Table 1 and Table 2 fields have to exist on Table 3 as lookup fields through those relationships. Put them on the Table 3 form wherever you want them. The form layout is where you control placement and alignment.

Then add form rules on that form, one per group:

When [Table3_Form_Field1] is not equal to Value1, hide [Table1_Field1] and [Table1_Field2]

When [Table3_Form_Field1] is not equal to Value2 and not equal to Value3, hide [Table2_Field1] and [Table2_Field2]

Writing them as hide rules means a new record starts with everything hidden since Field1 is blank, and each group shows up as soon as the user picks the matching value. No need to pull the fields off the form.