1C:Enterprise 8.3. Practical Developer’s Guide. Lesson 3 (2:10). Catalogs. Catalogs with tabular sections

Catalogs with tabular sections

Now you can proceed to creating the second catalog: Employees.

This catalog will be more complex than the Customers catalog. It will store not only the full employee name, but also their past employment data.

This data is uniform in structure (company, start and end dates, and job title), but the number of previous jobs varies. You will use a tabular section for storing this kind of data.

In Designer mode

Let us add the Employees catalog.

  1. In the configuration object tree, right-click the Catalogs branch and then click Add Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode.
  2. In the Name field, type Employees.

    The synonym is filled automatically based on the name.
  3. In the Object presentation field, type Employee.
  4. In the Extended list presentation field, type Employee list.

    Note that you do not have to fill the List presentation field (fig. 3.37).
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode
    Fig. 3.37. Specifying main catalog properties
  5. Click Next.

    This opens the Subsystems tab.

    The configuration logic suggests that the list of employees should be available in the Services and Payroll sections. Indeed, when a service is provided you need to specify the employee in charge. This information is used for calculating employee wages.
  6. Select the Services and Payroll check boxes (fig. 3.38).
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode 
    Fig. 3.38. Specifying subsystems where the catalog is available
  7. Click the Data tab.
  8. Leave the default values for the code length and type unchanged, and in the Description length field, type 50.

    Let us change the synonym of the Description standard attribute, just like you did for the Customers catalog.
  9. Click the Standard attributes button.
  10. Double-click the Description attribute and then, in the property palette, in the Synonym field, type Full name (fig. 3.39).
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode 
    Fig. 3.39. Specifying synonym for the Description standard attribute

In 1C:Enterprise mode

In the 1C:Enterprise window you can see that the Employees command is now available in the command panels of the Services and Payroll sections. This command opens the list of employees (fig. 3.46).Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In 1C:Enterprise mode
Fig. 3.46. Payroll section

The command name is determined by the object synonym because you have not defined the List presentation for this catalog.

Also the actions panel of the Payroll section now has the Employee command that creates employees (see fig. 3.46). The command name is determined by the Object presentation property that you defined for this catalog.

Now let us use this command to create catalog items without opening the list of employees.

Tabular sections

Let us add the PastEmployment tabular section.

  1. Click the Add tabular section button Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode / Tabular sections (fig. 3.40).
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode / Tabular sections
    Fig. 3.40. Adding a tabular section
  2. In the Name field, type PastEmployment (fig. 3.41).
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode / Tabular sections
    Fig. 3.41. Adding a tabular section

    Then let us create the tabular section attributes.
  3. Click the Add attribute button Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode / Tabular sections (fig. 3.42)
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode / Tabular sections
    Fig. 3.42. Adding a tabular section attribute
  4. Add the following attributes:
    • Company. Type: String, length: 100
    • StartDate. Type: Date, date contents: Date
    • EndDate. Type: Date, date contents: Date
    • JobTitle. Type: String, length: 100.
    You selected the Date contents for the StartDate and EndDate attributes (fig. 3.43) because in 1C:Enterprise values of Date type contain both date and time. In this case the time of day when the jobs started or ended is not important.
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode / Tabular sections
    Fig. 3.43. Tabular section attribute properties

    Finally, let us edit the command interface of the Payroll section to simplify creation of catalog items (make the standard employee creation command visible).
  5. Open the editor of the Payroll subsystem configuration object and click the Command interface button.

    This opens the Command interface window that lists all of the subsystem commands.
  6. In the Action panel.Create group, enable visibility for the Employee: create command.

    You can also see that the Navigation panel.Normal group contains the Employees command. It is visible by default (fig. 3.44).
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode / Tabular sections
    Fig. 3.44. Subsystem command interface settings window

    You do not have to add any commands to the actions panel of the Services subsystem because adding employees in this section is not a typical scenario.

    You completed the creation of the Employees catalog.
  7. Close the Employees catalog editor and start 1C:Enterprise in the debug mode.
  8. Confirm that you want to update the configuration.

    The platform displays the window that lists the changes in the configuration structure (the new Employees catalog).
  9. Click Accept (fig. 3.45).
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In Designer mode / Tabular sections
    Fig. 3.45. List of changes in the configuration structure

Filling tabular sections

Let us fill the tabular section.

  1. Run the Employee command.

    This opens the catalog item creation form. The form title is defined by the Object presentation property. This form includes a tabular section with the attributes that you defined in Designer.
  2. Create the following employees (fig. 3.47, 3.48, 3.49):

    • Alexander D. Johnson
      • Past employment:
        • Company: NTI Company
        • Start date: 2/1/2000
        • End date: 4/16/2003
        • Job title: Senior technician
    • John A. Walkman
      • Past employment 1:
        • Company: Global Automation Solutions, LLC
        • Start date: 01/22/2006
        • End date: 12/31/2012
        • Job Title: Engineer
      • Past employment 2:
        • Company: QDA Telecommunications Group
        • Start date: 06/20/1996
        • End date: 01/21/2006
        • Job title: Production manager
    • Michelle V. Turner
      • Past employment:
        • Company: Wilson and Beane Construction
        • Start date: 2/6/2001
        • End date: 4/3/2004
        • Job title: Master builder
    You can add rows to the catalog tabular section by clicking the Add button (fig. 3.47).

    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In 1C:Enterprise mode / Filling tabular sections
    Fig. 3.47. Filling an Employees catalog item
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In 1C:Enterprise mode / Filling tabular sections
    Fig. 3.48. Filling an Employees catalog item
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In 1C:Enterprise mode / Filling tabular sections
    Fig. 3.49. Filling an Employees catalog item

  3. Run the Employees command.

    It opens the employee list form where you can view the list of added employees. Note that the form title is determined by the Extended list presentation property that you defined for this catalog (fig. 3.50).
    Lesson 3 (2:10). Catalogs / Catalogs with tabular sections / In 1C:Enterprise mode / Filling tabular sections
    Fig. 3.50. Employee list

Now you can proceed to creating the next catalog: MaterialsAndServices.

Leave a Reply

Your email address will not be published. Required fields are marked *

1C:Enterprise Developer's Community