Version: eXtendMobile 1.11 and above
Audience: Administrator

Use Cases

  • Defaulting field values for create, edit and transform functions.

  • Default the current user's information in a field for create, edit and transform functions.

  • Overwriting existing value with a new default value for edit functions.

Summary

eXtendMobile allows users to set default values for fields that will be applied during function execution. This article will explore the various methods provided by eXtendMobile for field defaulting.

Configuration

Specifying Default Values on Select Fields

You can set default values from user fields or a static value on select fields.

Setting Static Default Value

  1. Go to the form configuration of the function where you want to set the default value for a select field.

  2. Tap the arrow present on the select field card to list its select options, and select the value you want to set as a default value.
    Image Placeholder

  3. After specifying the value, the selected value will be shown on the field tile.
    Image Placeholder

  4. Tap Save to save the function.

  5. When this function is executed, the default field will appear on the function. 
    Image Placeholder

Setting Logged in User Field Value as Default Value

  1. Go to the field details of the select field where you want to set the default value.

  2. In the Default Value From User field, select the field value which you want to set under this select field.
    Image Placeholder

  3. If you want to set the current user under the select field, select the internal ID field.

  4. Tap Save to save the function.

  5. When this function is executed, current user will be set in the select field as the default.
    Image Placeholder

  6. Note: In some cases, when the internal ID field is used, it may not be recognized as a valid search column field for certain record types. In such cases, an error related to invalid search column selection will be displayed. To resolve this issue, you will need to update the internal ID present in the User Field Search Column ID from id to internalid.
    Image Placeholder

Force Defaulting

When using edit functions with a specified default value, the value will only be set if the field does not already have a value. If you want to enforce the configured default value, you will need to check the checkbox named Force Default Value.
 
Image Placeholder

Specifying Default Values on Date Fields

For date fields you can default a specific date, or you can utilize custom default values such as today, tomorrow, or yesterday. You can also set values from the logged in user fields.

Setting Static Default Value

  1. This configuration is similar to configuring a static default value on a select field, as described above. However, instead of an options selection, you will have a date picker.




Setting Dynamic Default Value

  1. Navigate to date field's details page.

  2. Tap the Default Date field.

  3. The following options will be shown. 
    Image Placeholder

  4. Select the option as per your requirement.
    Image Placeholder

  5. Tap Save to save the function.

  6. When this function is executed, the default date will be generated based on the selected dynamic default value.

Setting Logged in User Field Value as Default Value

  1. This configuration is similar to configuring a user field default value on a select field, as described above. When selecting user fields, ensure that you select fields of the same data type. For example, select a date field to default into a date field to avoid any errors during function execution.

Force Defaulting

  1. If you want to enforce the configured default value, you will need to check the checkbox named Force Default Value.

Specifying default values on text, checkbox and integer fields

All other field types, such as text, checkbox, integer, and long text, support both static defaulting and defaulting values from logged in user fields.

Setting Static Default Value

  1. Configuration for this method is similar to other cases mentioned earlier in this article. To set a static default value, go to the form configuration and specify the desired value in the field's tile. For checkbox fields, use the radio button provided on the field's tile.

Setting Logged in User Field Value as Default Value

  1. The configuration for this setting is the same as the select field. The value present in the select user field will be set in the current field during function execution.