Step 2. Add new data

PDF
Beginner

On the previous step, we have fully configured the new section’s interface. On this step:

  • fill out the new lookups.
  • add the gym number system setting.
  • attach the new data to the development package.

Fill out the lookups

The list of possible field values is configured in the Lookups section of the System Designer.

scr_Lookups.png
  1. Fill out the “Periodicity” lookup
    1. Click scr_system_designer.png to open the System Designer.
    2. Go to the System setup block –> click Lookups.
    3. Find the “Periodicity” lookup using the filter at the top of the page.
    4. Open and fill out the lookup with these values:
      • Daily
      • Every 3 days
      • Weekly
      scr_Lookup_Periodicity.png
  2. Fill out the “Training status” lookup:
    1. Open the Lookups section.
    2. Find the “Training status” lookup using the filter at the top of the page.
    3. Open and fill out the lookup with these values:
      • Planned
      • Canceled
      • Completed
      scr_Lookup_TrainingStatus.png

Create a system setting

To implement the example, specify the number of group exercise gyms in Creatio. Use a system setting to do this.

All base and custom system settings are available in the System settings section of the System Designer.

  1. Click scr_system_designer.png to open the System Designer.
  2. Click System settings in the System setup block.
    scr_SystemSettings.png
  3. Click Add settings to add a system setting.
    scr_Add_Setting.png
  4. Fill out the property fields of the system setting:
    • Set Name to "Number of gyms".
    • Set Code to "GymsNumber".
    • Set Type to “Integer”.
    • Set Default value to 4.
      scr_SystemSetting_Fields.png

Bind data to the package

The new lookup and system setting data is stored in the Creatio development environment database. To enable migration of the developed functionality to the pre-production and production environments, bind the new data to the development package. Creatio uses the package data binding for this.

  1. Add the “Periodicity” lookup’s data to the package:
    1. Go to the Configuration section and select the “TryItPackage.”
    2. Click Add in the workspace toolbar and select the Data configuration element type.
      scr_Create_Data.png
    3. Select the “Periodicity” lookup’s object "UsrPeriodicity" in the Object field.
      scr_DataBounding_Periodicity.png
    4. Check if all columns with the object’s data are selected in the Columns Setting tab.
      scr_DataBounding_Columns.png
    5. Go to the Bound data tab and click Add.
      scr_BoundData_Add.png
    6. Select all records in the newly-opened window.
      scr_BoundData_Select.png
    7. Save the element.
  2. Add the “Training status” lookup’s data in a similar way. Specify "UsrTrainingStatus” as the object.
  3. Binding a system setting to a package involves binding the system setting’s code and value.
    1. Add a new Data type element to the package.
    2. Specify "SysSettings" in the Object field. This is the data table that stores codes for all Creatio system settings.
      scr_DataBounding_SysSettings.png
    3. Click Add on the Bound data tab and use the filter to find the "Number of gyms" setting in the window that opens.
      scr_SysSettingData_Select.png
    4. Save the element.
    5. Create one more Data type element and specify "SysSettingsValue" in the Object field. This is the data table that stores values for all Creatio system settings.
      scr_DataBounding_SysSettingsValue.png
    6. Use the system setting filter in the Bound data tab to select the data for the "Number of gyms" system setting.
      scr_SysSettingValueData_Select.png
    7. Save the element.

As a result, we have added the example's required data to the interface and attached it to the development package. On the next step, implement the business logic of the example.