5.2. Creating Object 1001 Tickets (base)

 

5.2.1. Creating Object 1001 Tickets (base)

Having created the necessary set of basic objects, it is possible to proceed to create objects whose fields have links to other tables that perform the function of references. This feature is often used when creating compound tables. In this case, there is a subordinate relationship between the tables in the composition.

 

For example, if you select a ticket in the defining table, tables that display statuses and comments automatically display only those records that are relevant to the selected ticket.

 

The object Tickets when creating or updating the ticket will provide the ability to select a customer from the table 1301 Customers and the responsible employee from the table 1401 Users.

 

The object Status when adding new status will provide the ability to select status type from the table 1101 Status type, and will also display ticket number.

 

The object Comment when adding a new comment will also provide the ability to select comment type from the table 1201 Comment type, and will also display ticket number.

 

To create an object 1001 Tickets (base):

 

5.2.1.1. Select Menu > Configuration

 

 

5.2.1.2. In the appeared window, click Yes

 

 

5.2.1.3. In the Configuration Development window, in the Connection field, select the SUPPORT connection;

5.2.1.4. in the Password field, enter 1111

 

5.2.1.5. Click Configure;

5.2.1.6. Open the configuration folder 2.Objects;

5.2.1.7. Open the context menu of the folder 1000 Ticket by right-clicking the mouse; 

 

 

5.2.1.8. Select New object > Table

 

 

5.2.1.9. в окне Свойства в поле Код объекта ввести 1001, в поле Наименование объекта ввести Обращения (основа).

5.2.1.9. In the Properties window, enter 1001 in the Object Code field, enter Tickets (base) in the Object Name field. 

 

 

 

5.2.2. Grid Design

To change the table:

 

5.2.2.1. Open object 1001 Tickets (base) for modification by double-clicking the left mouse button; 

 

 

Note: if you want to study grid design process in detail, follow the steps 5.2.2.2 - 5.2.2.11. If you already know how to do this, skip the steps 5.2.2.2 - 5.2.2.11 and go to the step 5.2.2.12.

 

5.2.2.2. In the field Data Source specify the object - vw_objects;

 

 

5.2.2.3. In system fields Record ID, Date & Time (Created), Date & Time (Updated), Date & Time (Closed), User ID, select accordingly fields user_id, dttmcr, dttmup, dttmcl, userid;

 

 

5.2.2.4. Open the context menu by right-clicking in the empty space of the object, choose Add a column and select columns object_ref_nr, status_type_name, client_fullname, user_fullname, object_remark

 

 

5.2.2.5. Select each column by clicking the left mouse button on any line of the table, specify in the field Caption the displayed name of the column - Ticket №, Status, Customer, Employee, Comment, respectively; 

 

 

 

5.2.2.6. Move the mouse pointer over the border between the headings of the first and the second column;

5.2.2.7. Click the left mouse button and, without releasing it, change the width of the first column;

 

 

5.2.2.8. In the same way set the required width of the other columns;

 

 

5.2.2.9. Select the last column and in the field Auto Size specify the value 1-Yes - column size will vary depending on the free space of the screen;

 

 

5.2.2.10. Select the column object_ref_nr and set the Sort field to 2-Descending

 

 

5.2.2.11. In the fields Allow Additions, Allow Editions, Allow Deletions select 1-Yes;

 

 

Note: If you followed the steps 5.2.2.2 - 5.2.2.11, skip steps 5.2.2.12 - 5.2.2.17 and go to step 5.2.2.18.

 

5.2.2.12. Download the file archive containing the settings of objects;

5.2.2.13. Extract the files from the downloaded archive;

5.2.2.14. Open the context menu by right-clicking in the data area; 

 

 

5.2.2.15. Select Import settings from the file;

5.2.2.16. In the appeared window specify the path to the file 1001_Table;

 

 

5.2.2.17. Click the Open button;

 

All table settings will be imported.

 

 

5.2.2.18. Save changes by selecting Menu > Save or by clicking the appropriate button in the toolbar.

 

 

5.2.3. Form Design

To change the form:

 

5.2.3.1. Go to Form Design by selecting View > Form Design, or by pressing the appropriate button in the toolbar;

 

 

Note: if you want to study form design process in detail, follow the steps 5.2.3.2 - 5.2.3.38. If you already know how to do this, skip the steps 5.2.3.2 - 5.2.3.38 and go to the step 5.2.3.39.

 

5.2.3.2. In the field Data Source choose database object - t_objects;

 

 

5.2.3.3. In system fields Record ID, Date & Time (Created), Date & Time (Updated), Date & Time (Closed), User ID choose fields from the table - client_id, dttmcr, dttmup, dttmcl, userid;

 

 

5.2.3.4. Click the left mouse button on the Field button on the toolbar;

 

 

5.2.3.5. Move the mouse pointer to the data area;

5.2.3.6. Press the left mouse button and, without releasing it, outline the size of the field;

 

 

5.2.3.7. In the field Control Source select object_ref_nr

 

 

5.2.3.8. Because ticket number is automatically assigned in the database, access to the field should be closed. Specify the value 0-No in the field Enabled; 

 

 

5.2.3.9. In the field Back Color choose a background color;

 

 

5.2.3.10. Likewise add three more fields, each subsequent lower than the previous one; 

 

 

The second and third fields refer to the references - tables 1301 Customers and 1401 Users. To form a field that references another object:

 

5.2.3.11. Select the second field added; 

 

 

5.2.3.12. In the field Control Source click the Advanced button; 

 

 

5.2.3.13. In the appeared window type in client_id!1301.client_fullname, where client_id is the secondary key, the field in the current database object (t_objects), to which the value of the system field Record ID - the primary key - of the called object will be written, 1301 - the called object, client_fullname - value to display in this field; 

 

 

5.2.3.14. Click the Save button; 

 

 

5.2.3.15. Select the third field added; 

 

 

5.2.3.16. In the Control Source field, click the Advanced button;

5.2.3.17. in the opened window enter the value object_to_id!1401.user_fullname

 

 

5.2.3.18. Click the Save button; 

 

 

5.2.3.19. Select the last field added; 

 

 

5.2.3.20. In the Control Source field, select object_remark

 

 

5.2.3.21. Left-click on the Label button on the toolbar;

 

 

5.2.3.22. Move the mouse pointer to the data area;

5.2.3.23. Press the left mouse button and, without releasing it, outline the size of label so that the label is left to the field object_ref_nr

 

 

5.2.3.24. In the Caption field type in Ticket №

 

 

5.2.3.25. Similarly, add three more labels (one to the left of each field); 

 

 

5.2.3.26. In the Caption field for each of the added labels, type in Customer, Employee and Comment respectively; 

 

 

5.2.3.27. Select Edit > Select All

 

 

5.2.3.28. In the Height field specify the height of the elements - 0,6; press the Enter key; 

 

 

5.2.3.29. Select all the labels by clicking the left mouse button and, without releasing it, outlining the area on the screen with the mouse pointer;

 

 

5.2.3.30. In the field Width specify the width of the labels - 3; press Enter;

 

 

5.2.3.31. Select all fields;

 

 

5.2.3.32. In the field Width specify the width of the field - 6; press Enter;

 

 

5.2.3.33. Select Edit > Select All;

5.2.3.34. Select Arrange > Align > Top;

5.2.3.35. Select Arrange > Align > Left;

 

 

5.2.3.36. Move the mouse pointer over the elements, press the left mouse button and, without releasing it, move all the elements in the upper left corner;

 

 

5.2.3.37. Move the mouse pointer to the lower right corner of the data area, press the left mouse button and, without releasing it, reduce the size of the data area to a minimum;

 

 

5.2.3.38. Select the field object_remark - this field will occupy the remaining free space when working in the form and store multi-line text, so you should allow the text to scroll vertically by setting the Scroll Bars field to 2-Vertical

 

 

Note: If you followed the steps 5.2.3.2 - 5.2.3.38, skip steps 5.2.3.2 - 5.2.3.38 and go to step 5.2.3.45.

 

5.2.3.39. Download the file archive containing the settings of objects;

5.2.3.40. Extract the files from the downloaded archive;

5.2.3.41. Open the context menu by right-clicking in the data area;

 

 

5.2.3.42. Select the menu item Import settings from file;

5.2.3.43. In the appeared window, specify the path to the file 1001_Form

 

 

5.2.3.44. Click the Open button;

 

All settings of the form will be imported.

 

 

5.2.3.45. Select Menu > Save. 

 

 

5.2.3.46. Close the object by clicking on the corresponding button. 

 

 

 

5.2.4. Next

5.3. Creating Object 1102 Status (base)