How to make a cell in a table required
Cells in a table can be enabled, required, or read-only based on the rules of a condition. For example, let's say you have a dynamic table on a form for injuries on a job. This dynamic table contains the name of the person injured, if the injury requires treatment, and if it requires treatment, the type of treatment required. The following procedure provides the steps to create this dynamic table and how to make a cell required:
- On the form, from the Actions/Containers menu, click Dynamic Table.
- The dynamic table is added to the form. Next to the Column 1 Label, click
, then Insert Column. Insert another column so the dynamic table has a total of 3 columns.
- Click on the dynamic table input. In the Label field, enter Injuries.
- Back in the Form Designer, enter Name of Injured in the Column 1 Label field and select Text as the field type.
- Enter Injury Requires Medical Attention in the Column 2 Label field and select Radio as the field type. Click
(Edit) for the radio type, then expand Input Options.
- Click
to open the Options window. Enter Yes and No as the options, then click OK.
- Enter Treatment in the Column 3 Label field and select Checkbox as the field type. Click
(Edit) for the checkbox type, then expand Input Options. - Click
to open the Options window. Enter On-Site Treatment, Emergency Room, Schedule Doctor's Appointment and Other as the options, then click OK.
- In addition, Toggle Add Field to Last Option and select Text Field as the Last Option Field Type.
- Save your changes to the form.
- Now let's make the Treatment cell of the dynamic table required when medical treatment is necessary. Click
(Edit) for the Checkbox field type, then expand Cell Condition.
- From the Type field, select Requiring Entry. Click
to open the Condition window.
- Click + to add the rule. Select Injuries_Injury_Requires_Medical_Attention from Field and is equal to as the Operator, Value as the Value Type, then Yes as the value.
- Click OK to close the Condition window.
- Save the form.
- Now on the device, when a user answers Yes to the Injury Requires Medical Attention field, the Treatment field is required (identified with the red asterisk).