A field's Enabled property decides whether the field accepts input. Set it to a calculation and the field is available only while that calculation returns true.
The example below enables Buddy Name (buddyName) only when Worked Alone? (workedAlone) has been answered and the answer is No.
Before you start
You need a form open in the Designer with the field you want to control and the field whose answer controls it. You also need the exact string the controlling field will hold, because the comparison matches character for character.
Check for a value before comparing it
Combine Has-Value with Equals rather than using Equals alone. Without the Has-Value term, the calculation is evaluating a field that has not been answered yet, and the result is not what you want on a newly opened form.
Build the calculation
Select the field you want to control on the form canvas. Its outline turns blue. In this example that is Buddy Name.
Click the ÎŁ icon in the right rail to open the Conditions panel. It lists the properties a calculation can drive: Initial, Enabled, Readonly, Update, Reset When Enabled To, and Reset When Disabled To.
Set Enabled to
calculation. The dropdown offers three values,false,trueandcalculation. Choosingcalculationopens the Calc Editor immediately.Check the Calc Editor's title bar. It reads
buddyName | Enabled Calculation (boolean). The left panel is headed Available Boolean Expressions, scoped to the boolean result this property needs.Type
Andinto Search Boolean Expression and drag And onto the canvas, where the empty state reads Drag and Drop a Boolean Expression or a Form Field Here. The block arrives with two operands, and the second is pre-filled with a booleanconstantset toTrue.Search for
Has-Valueand drag it into the first operand. Its description reads "returns true if the field referenced has a value set".Click the magnifier inside the
has-valueblock to open the Field Browser, type part of the field's name into Search, click the row you want, then click OK. The browser lists every field with its type, so pickworkedAlone.Drag Equals into the second operand, replacing the
constantthat was pre-filled there.Set the first operand of the
equalsblock to the same controlling field, using its own magnifier. The block relabels itselfequals-string, which confirms it is comparing text.Click into the second operand of the
equalsblock and type the value to match. In this example that isNo.Click OK to close the Calc Editor, then save the form.
Setting a field operand
Any operand that takes a field shows a magnifier. Clicking it opens the Field Browser, which lists the whole form as a tree with a Field Name and a Field Type column, shows the operand's current reference as a chip, and filters as you type in Search. Pick a row and click OK.
The other way to fill the same operand is to drag a field in from the Form Fields panel. That works, but it has a step that is easy to miss. Click the operand first, so that it highlights and the panel rescopes to that operand's type, then drag the field onto it. Dropping onto an operand you have not selected does nothing at all.
The Field Browser skips that entirely, and it applies no type filter, so it reaches a field of any type without turning anything on.
Check it worked
The Enabled row in the Conditions panel now reads calculation with a ÎŁ icon beside it. Clicking that ÎŁ reopens the Calc Editor on the saved expression.
The design canvas does not evaluate calculations, so Buddy Name is still drawn there no matter what the expression returns. Design mode shows the layout; it does not run the logic.
Switch to Preview with the magnifier icon in the top bar to see the calculation run. With Worked Alone? unanswered the calculation is false and Buddy Name is not drawn at all. Answer No and it appears, ready for input. Answer Yes and it goes away again, because the comparison fails.
Whether a disabled field disappears or stops accepting input is a presentation setting rather than part of the calculation. It is the Hide While Disabled toggle in the field's Presentation Properties.
If the field you need isn't listed
The Form Fields panel on the right is scoped to the type the calculation has to return, so a boolean calculation lists boolean fields only, under the heading Form Fields (boolean). A string field such as workedAlone is missing from it until you turn on Show All Fields at the bottom of that panel.
The Field Browser is the way around this. It is reached from the operand's magnifier rather than from the panel, and it is not filtered by type, so the field is there whether or not Show All Fields is on.