How to add custom fields to the 'Crisis task' table - Emergency self report dashboard


Description

In this example, users were not able to add the custom fields to the 'Crisis task' table unless they modify the widget 'Submit Update form'. The issue is seen in the APP version '1.0.4' but the users were able to update values to the custom fields in APP version '1.0.3'.  

Cause

The cause of the issue is that it has been hard-coded to update only the 'request_type' and the 'requested_for'. Even if the customer adds the custom field to the "sn_imt_quarantine_crisis_task" table, the tasks will not be updated with the custom field value.

Resolution

If you want to add the custom fields, you need to modify the 'Submit update form' widget. For example:

In the server script of the widget, add the similar line at line 8

gr.setValue('u_testsnc',input.u_testsnc);


In the client controller of the widget, add the similar line at 39

u_testsnc: g_form.getValue('u_testsnc'),

Note: 'u_testsnc' is the custom field.

After updating the widget, you need to update the business rule 'Update existing user's status' as well. By updating the widget, the custom field value will be captured only when a new HR task is submitted. To modify the field values for the existing HR tasks, the business rule 'Update existing user's status' should be modified.

Example: Add a similar code at line 16 in business rule

grCrisisRec.setValue('u_testsnc', current.getValue('u_testsnc'));