Development > Script dictionary > Inquiries 

An inquiry is used to extract information from one or more tables, presented in the form of a grid. The selection is made as a function of criteria that can be entered at the start of a search.

The inquiry management gives the possibility :

 to parameterize the inquiry screen,

 to present the result of an inquiry in the form of a graph,

 to have memo management, to save the selection criteria. The memo extension code is entered in the memo coding table. 

An inquiry presents itself in the form :

 a window composed of a header containing the principal selection criteria and a tab displaying the result of the selection in the form of a grid. There is however no limit to a single tab.

 a window made up of a single screen. This is a window that can be called from the "Criteria" button. It is used as its name suggests for the complete entry of the selection criteria, the record sort criteria, the entry of memos, the entry of a screen that can be parameterized for the display of the inquiry results.

 There is no left list.

The graph can be personalized and is considered as parameterization. It is entered in the screens for the inquiry parameterization.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Fields

The following fields are present on this tab :

This code identifies the inquiry.

  • Title (field DES)

This text is picked up in the tile of the tab for the principal inquiry window.

Close

 

Tab Screens

Presentation

The first tab is used to identify the windows used by the inquiry as well as to define the general characteristics.

Close

 

Fields

The following fields are present on this tab :

Characteristics

  • Module (field MODULE)

Module belonging to the setup. This field is used to specify whether the screen has to be created in the folder database. It is specified when the module linked to the screen is active in the folder.

An activity code is used to:

  • make optional an element in the dictionary if the value associated with the activity code is null.
  • identify the specific/custom elements if they are marked with a code starting with X, Y or Z.
  • size a maximum number of lines when the activity code marks elements from a grid.

In this way, if the activity code is disabled, the marked element will not be useable, and the associated code (if any) will neither be generated nor can be activated.

Scripts

  • Standard script (field PRGSTD)

The following must be developed in this process :

  • the loading of the inquiry grid.
  • the tunnels and unfolding of lists by right button
  • the analysis of the entry parameters in the inquiry
  • the change of the screen code according to the principal search key.

This process must contain the label $ACTION.
For more information see the Development help.

  • Specific script (field PRGSPE)

Reserved for the distributor. Identical behaviour to the standard process.

Data

The main window in the inquiry is made up of a header screen and a tab with a grid having NBLIG as its bottom of page field. It is however possible to add additional tabs on the condition that they are filled by the process. Rules on construction.

The grid screen is also used as a reference screen in the management of enquiry screens.

This window is optional. It groups the selection criteria, the sort criteria, the memo code, the code for a screen can be parameterized. It must be without a header and have a single tab. Rules on construction.

 

  • field SCRABB1

 

 

  • field SCRABB2

 

 

  • field SCRABB0

 

Block number 4

This zone is optional.

  • If the criteria window is defined with a zone ECRAN (screen) assigned, the grid displayed corresponds to the screen associated with the criteria window screen (screen WM+ Inquiry code+Screen code).
  • If the criteria window is defined with an empty ECRAN field and the default screen code is parameterized, by default the grid displayed corresponds to the screen associated with the screen code (screen WM+Inquiry code+ Screen code by default).
  • If not, the grid displayed corresponds to the grid screen for the principal window.

Table

  • Header fields (field FLD1)

This grid is used to make a correspondence between the header screen criteria fields and those of the criteria screen and to identify the display criteria whether they are in the header screen or in the criteria window. During enquiry, the modification of the display criteria causes the redisplay of the current enquiry page, whilst the modification of the other criteria causes a new search from the first page.

  • Criteria fields (field FLD0)

 

  • Display criterion (field DSYCRI)

 

Close

 

Tab Tables

Presentation

In this tab, it is possible to give a list of database tables to be opened at the start of the inquiry : these tables will be opened with the dictionary abbreviation and accessible in the inquiry.

Close

 

Fields

The following fields are present on this tab :

Table

Indicate the tables to open at the start of the inquiry. They will be opened with the abbreviation defined in the table dictionary.

Close

 

Tab Miscellaneous

Presentation

Close

 

Fields

The following fields are present on this tab :

Search key

Indicate the associated object, when wanting to be use it and to update the "last read" by the inquiry.

used to manage the radio buttons, if they are parameterized for this inquiry. If an object has been specified, the table managed by this object will be loaded here. Also indicated here is what abbreviation the table uses in the inquiry management. By default, the abbreviation in the table dictionary is proposed. This field is not used to filter the records in the inquiry.

  • field FILABB

 

  • Key (field FILKEY)

Indicate the key for the table, for the radio buttons and the management of the last read.

  • Site field (field ZSITE)

Defined here is the field in the principal table where the site attached to the record is found. The fact of defining this field makes it possible to automatically manage the access restrictions for the site data.

  • Access code field (field ZACC)

The field in the principal table where the access code attached to the record is found is defined here. The fact of defining this field makes it possible to automatically manage the access restrictions linked to the access codes.

  • Conditions (field FILCND)

This zone is optional. It makes it possible to indicate a selection criterion for a table in a way that ignores certain inappropriate records by using the radio buttons or in the management of the last read.

  • Radio buttons (field MAGNETO)

Used to activate the radio buttons : First, Previous, Next and Last at the top of the principal inquiry window.

Table

  • Key component (field CPNKEY)

 

  • Header fields (field CPNSCR)

Indicate the correspondence between the components of the key and the fields in the inquiry header screen.

Block number 3

Close

 

Specific Buttons

The confirmation is used to generate the automatic process linked to the inquiry (WWCNSxxx, or xxx is the inquiry code).

The following fields are present on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

This field is used to define the folder from which the record is going be copied. The possible syntaxes are described in the dedicated appendix.

  • All folders (field TOUDOS)

This option is used to copy the record to all the folders defined in the dictionary (ADOSSIER table from the current solution).

  • To folder (field DOSDES)

This field used to define the folder in which the record is going be copied. The possible syntaxes are described in the dedicated appendix.

Close

This button is used to copy the inquiry definition to another folder. Warning, it will be necessary to validate the inquiry in the destination folder.

This button is used to view the principal window design. The inquiry must have been validated.

This button is used to view the principal window design in Web mode. The inquiry must have been validated.

Menu Bar

Documentation / Paragraphs

This function is used to access the documentation management on the first paragraph of the documentation (if there is one) associated to the current record.

Documentation / Links

This function is used to access the links management. It is used to define the links between the current and other records (for example the links between functions and setups). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu is used to launch a documentation generation. The generation can also be launched from the [Generation] button at the bottom of the window.

Three types of generation can be launched one by one or simultaneously:

  • the generation of the documentation structure from the dictionary (tables ADOCUMENT, ADOCBLB, ADOCCLB).
  • the generation of the documentation from the previous tables.
  • the generation of the field documentation.

The range suggested by default takes into account the current record but it can be modified upon launch.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Window ... locked record.

There is a logical lock on this window.

Non-existent window

The window entered in the inquiry is not declared in the windows dictionary.

Window without header screen

The principal window MUST be composed of a header and at least one tab.

Window without tab

The principal window MUST be composed of a header and at least one tab. The criteria window MUST be composed of a tab.

Window with several tabs

The criteria window can only contain a single tab.

Window with header screen

The criteria window cannot contain a header.

Non-existent screen

The screen associated with the window is not declared in the screen dictionary.

Screens with the same abbreviation

The header screen and the tab associated with the principal window as well as the criteria window tab must have a different abbreviation. Check the dictionary of these screens.

Screen without end of page NBLIG grid

For the inquiry model requirements, the tab in the principal window must contain a grid where the bottom of grid variable must be named NBLIG.

Mandatory field

In the grid that associates the header fields and the criteria window fields, when a line is created at least one field must be specified.

The grid containing the correspondence between the elements of the key and the header field must be entered.

Non-existent field

The fields defined in the grid that associates the header fields and the criteria window fields must be declared in the header screens or the "criteria" tab.

The fields defined in the grid that associates the header fields and the criteria window fields must be declared in the header screen.

This field must be of the type

In the grid that associates the header fields and the criteria window fields, the criterion field must be the same data type as that in the header.

In the grid that associates the header fields and the criteria window fields, the fields must both be of the same type.

Non-existent key

The declared key must exist in the dictionary of the table entered in the previous field.

Non-existent field

The field for the declared site must exist in the dictionary for the table entered in this tab.

Non-existent file

The graph type must be a file with the extension vtc, and must be present in the GRAPH sub-directory of the current folder.

Tables used

SEEREFERTTO Refer to documentation Implementation