In Designer mode

Let us add the prices to the list of materials and services.

  1. In Designer, open the list form of the MaterialsAndServices catalog.
  2. Open the property palette of the main List attribute.
    Up to this point the Main table property of the dynamic list was set to Catalog.MaterialsAndServices (see fig. 27.10) and the list was generated using a query to the table.
    Now you also need the related data from the Prices.SliceLast information register table.
  3. Select the CustomQuery check box and then, in the List setup field, click Open (fig. 27.16).

    Fig. 27.16. Opening dynamic list settings

    This opens the dynamic list settings window. On the Query tab you can see the query that selects all the fields from the Catalog.MaterialsAndServices table. Let us modify it.
  4. Click the Query Builder button (fig. 27.17).

    Fig. 27.17. Creating a custom query for a dynamic list
  5. Add Prices.SliceLast to the list of tables and select the Price field from this table (fig. 27.18).

    Fig. 27.18. Adding a second table

    Let us edit the automatically generated relation between the tables.
  6. On the Links tab, select the All check box for the Catalog.MaterialsAndServices table and clear the All check box for the Prices.SliceLast table (fig. 27.19).

    Fig. 27.19. Specifying the relation between the tables

    This is how you specify that the list of materials and services displays all the items, including those that have no prices assigned. You performed similar steps in lesson 13 "Reports" for the Service list report.

    This completes the query creation.
  7. Click OK.
    You are already familiar with the query script so we will not discuss it here.
    So you added the option to display the Price column, which contains the current prices, in the list of materials and services, but the column is not yet added to the list form.
    Now let us specify the conditional appearance of the Price column by highlighting low prices with a color.
  8. In the dynamic list settings window, click the Settings tab.
  9. Click the Conditional appearance tab.
    This tab contains the conditional appearance of the list rows that you created earlier in this lesson.
  10. Click the Add  button.
    First, let us specify the formatting for highlighting fields.
  11. In the Format field, click the selection  button  and select blue text color.
    Then let us specify the condition for the appearance to be applied (when the text in the Price column should be blue).
  12. In the Condition field, click the selection button .
  13. In the window that is opened, click the Add  button and then click New item.
  14. In the Left value column, select Price.
  15. In the Comparison type column, select Less than.
  16. In the Right value column, enter 500 (fig. 27.20).
    Finally, let us specify the fields where the formatting is applied.
  17. In the Formatted fields column, click the selection button .
  18. Click Add  and select Price (fig. 27.20).

    Fig. 27.20. Dynamic list conditional formatting settings 
  19. Click OK.
  20. Drag the Price field from the attributes pane to the controls pane (fig. 27.21).

    Fig. 27.21. Adding a column to the list form

    Now let us specify individual properties for each conditional appearance settings item.
  21. In the dynamic list settings window, on the Settings tab, click the first settings item and then click the Custom settings item properties  button.
  22. Select the Include in custom settings check box, set Presentation to Services, and in the Edit mode field, leave the Quick access value.
  23. Click OK.
  24. For the second settings item, select the Include in custom settings check box, set Presentation to Low price, and in the Edit mode field, leave the Quick access value.
  25. At the bottom of the tab, set the general Editing mode property to Normal (fig. 27.22).

    Fig. 27.22. Conditional appearance settings item properties
Next page: In 1C:Enterprise mode
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.