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/Container menu on the right side of the Forms Designer, drag Dynamic Table onto the form.
- 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 (Edit) to open the Edit Dynamic Table window. In the Label field, enter Injuries, then click OK.
- 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 the Edit to open the Edit Radio 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 to open the Edit Checkbox window. Enter On-Site Treatment, Emergency Room, Schedule Doctor's Appointment and Other as the options. In addition, mark the Add Field to Last Option checkbox and select Text Field.
- Save your changes to the form.
- Now let's make the Treatment cell of the dynamic table required when medical treatment is necessary. Click the Edit icon for the Checkbox field type to open the Edit Checkbox window.
- Click the Cell Condition tab.
- From the Conditional applies to field, select Requiring Entry. Then add the conditional rule by clicking +. Select Injuries_Injury_Requires_Medical_Attention from Field and is equal to as the Operator, then Yes as the value.
- Click OK, then click to 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).