UX Component - Detail View - New Records - Default Values


When you define a List control with a Detail View you can specify Javascript code to return the default value for a field when a new record is created in the Detail View.

A new option has been added to the List builder to allow you to automatically use the default value that was defined for the control to which the List field is bound for new record default values. For example, assume:

  • You have a list with a field called FNAME

  • You have a control in the List's Detail View called FIRSTNAME and the FNAME List field is mapped to this control

  • In the List builder, you defined the following Javascript code for the FNAME field's default value: return 'Sam';

  • The FIRSTNAME control has its Default value property set to 'Fred'.

When you click the New Record button in the List Detail View, the default value for the FIRSTNAME control (i.e. the control to which the FNAME List field is bound) will be set to 'Sam' because there was an explicit Default value rule set in the List builder. The default value of 'Sam' will be used even though the FIRSTNAME control defined a default value of 'Fred'. However, assume that you now edit the List and delete the Default value Javascript code for the FNAME field. Now, when you create a new Detail View record, the default value shown in the FIRSTNAME control is governed by the setting of the 'Default values policy for new record in Detail View' property in the List builder. This property can either be set to:

  • UseControlValue - (default choice)The default value will be 'Fred'

  • None - The control will not have a default value (even though the control specified 'Fred' as its default value)