Version: eXtendMobile 1.12 and above
Audience: eXtendMobile Admin

Use Cases

  • Default field values for create, edit, and transform functions.
  • Default the current user's information in a field for create, edit, and transform functions.
  • Overwrite existing values with new default values for edit functions.

Overview

eXtendMobile allows functions to include fields that are set based on assigned default values and then applied during function execution. This article explores various methods for field defaulting.

Configuration

Specify Default Values on Select Fields

You can set default values from user fields or a static value on fields of the "Select" type.

Set 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 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.
    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

Sett 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 field, select the option named USER FIELD. A button named Configure Default Value from User Field will become available.
    Image Placeholder
  3. When you tap the Configure Default Value from User Field button, an option to set the default user field based on entity types will appear.
    Image Placeholder
  4. If you want to set the current user in the select field that is being configured, select the "Internal ID" field.
  5. Tap Save to save the function.
  6. When this function is executed, current user will be set in the select field as the default.
    Image Placeholder
  7. 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, enable the Force Default Value preference.
 
Image Placeholder

Specify 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.

Sett 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.



Set Dynamic Default Value

  1. Navigate to date field's details page.
  2. Tap the Default Value 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.

Set 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, enable the Force Default Value preference.

Specify 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.

Set 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.

Set 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.