Populating texts in a row using IF statements means that when a certain condition is met, your desired text is shown at the end of the row.
To get started, use either a 'Prefilled' or 'Default' table. Our display cell will be along the row so using a prefilled or default table won't make any difference unless your specific form calls to choose either of the two.
Use the formula IF() and set your condition:
=IF(Test, Then value, Otherwise_Value)
For example(default table):
Given that when the user selects "APPROVED", the text "Leave has been approved" shows. When the user selects "REJECTED", the text "Leave is not approved".
Suppose that this example uses a prefilled table.
List cell - Cell C1
Display cell - Cell D1
Use the formula in cell D1:
=IF(C1="APPROVED", "Leave has been approved", "Leave is not approved")
NOTE: This formula however displays the Otherwise_Value as a default before you fill out the form.
Employee Name | Date of Leave | Approval (Approved | Denied) | Disclaimer |
|
| (C1 - list field) | =IF(C1="Approved", "Leave has been approved", "Leave is not approved") |
Default tables don't have a fixed number of rows when you're creating a template. Your formulas will reference columns, so each time you add a new row in filling out your form, the same formula applies to each cell in that column.
An alternative formula can be used for two options, and this can also be used when there are more than two options. Use IFS():
=IFS(Condition1, Value1, Condition2, Value2, Condition3, Value3, Condition_n, Value_n)
For example(prefilled table):
Given that when the user selects "Project A", the text "Proceed to Zone A" shows. When the user selects "Project B", the text "Proceed to Zone B" shows. When the user selects "Project C", the text "Proceed to Zone C" shows.
Suppose this example uses a default table.
List cells - Cells B
Display cell - Cells C
Use this formula in cell C1 and adjust accordingly in other C cells,
=IFS(B1="Project A", "Proceed to Zone A", B1="Project B", "Proceed to Zone B", B1="Project C", "Proceed to Zone C", 1=1, "")
Equipment List | Location | Disclaimer |
Equipment 1 | (B1 - list field) | =IFS(B1="Project A", "Proceed to Zone A", B1="Project B", "Proceed to Zone B", B1="Project C", "Proceed to Zone C", 1=1, "") |
Equipment 2 | (B2 - list field) | =IFS(B2="Project A", "Proceed to Zone A", B2="Project B", "Proceed to Zone B", B2="Project C", "Proceed to Zone C", 1=1, "") |
Equipment 3 | (B3 - list field) | =IFS(B3="Project A", "Proceed to Zone A", B3="Project B", "Proceed to Zone B", B3="Project C", "Proceed to Zone C", 1=1, "") |
Equipment 4 | (B4 - list field) | =IFS(B4="Project A", "Proceed to Zone A", B4="Project B", "Proceed to Zone B", B4="Project C", "Proceed to Zone C", 1=1, "") |
Calculations can occur across all rows & columns within the prefilled table. So whichever format you choose, you can reference any cell.