To implement dynamic index switching

If an overview session's standard command set has the Sort by option selected, users can select different indices by which the records in the grid are sorted. The user selects an index from the View menu's Sort by submenu. When a user selects a new index, the view fields above an overview session's grid do not change, and the field order in the grid does not change.

Dynamic index switching allows you to configure session indices, so that when a user selects a new index from the Sort by submenu, the view fields above the grid can change, and the field order in the grid can change.

You can only implement dynamic index switching for sessions whose standard command set includes the Sort by option in the Form Option Sets (ttadv3120s000) session.

To implement dynamic index switching for an overview session:

  1. select the session's dynamic index switching options in the Sessioni (ttadv2100s000) details session.
  2. specify the session's index and view field settings in the Available Indices by Session (ttadv2101s000) session.
Select dynamic index switching options

You can start the Sessioni (ttadv2100s000) details session via the Sessioni (ttadv2500m000) overview session.

  • On the Form tab of the details session, in the Dynamic index switching box, select either of the following radio buttons:
    • Riavvia quando campi vis. differiscono. If switching indices results in the view fields above the grid changing, LN Tools restarts the session.
    • Riavvia sempre. Users can switch indices in the Overview session, which always restarts the session.

You can select the Show name of index check box, so that the current index displays in the overview session's title bar.

Nota

You can only select the radio buttons if your session is integrated. For non-integrated sessions, you must use the predefined "dynamic.index.switching" variable in the before.program section of the session's program script:

  • "dynamic.index.switching = -1" has the same effect as selecting the Riavvia quando campi vis. differiscono radio button
  • "dynamic.index.switching = -2" has the same effect as selecting the Riavvia sempre radio button.
Specify index and view field settings

To start the Available Indices by Session (ttadv2101s000) session, click Indices on the Specific menu in the Sessioni (ttadv2500m000) session.

  • Select the check boxes of the session's indices for which you want to implement dynamic index switching.
  • For every index whose check box you select:

    • in the field of the Sort column, enter the order the indices display on the session's Sort by submenu. The index with the value 1 (one) will be the session's default index.
    • in the field of the View column, enter the number of the index's parts (in ascending order) to be displayed as view fields above the overview session's grid. The remaining values of the Index Parts box make up the first columns of the overview session's grid.

The index part values are listed in the Index Parts box of the Table Indices (ttadv4121s000) details session. To start this session, double-click your session's table in the Table Definitions (ttadv4520m000) session, and subsequently select the Indices tab. Double-click an index to view the index's parts.

Esempio

An index consists of the following index parts:

  • item (item code)
  • wght (weight)
  • hght (height)
  • lnth (length)
  • wdth (width)

If you select 2 in the index's View field, in the Available Indices by Session (ttadv2101s000) session, the item code, and weight fields display as view fields above the grid. Height, length, and width make up the first columns of the grid.

Nota

If a field has the View check box on the Properties tab of the Dynamic Form Editor 's Field Properties dialog box selected, the field is always shown as a view field in the overview session regardless of your Dynamic Index Switching settings. If you want a field to be excluded as a view field for certain indices, you must clear the View check box for that field on the Properties tab of the Dynamic Form Editor 's Fields Properties dialog box.