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.

  • Description (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)

Select a module for the setup.

Use this field to specify if the screen has to be created in the folder database. This is the case when the module linked to the screen is active on the folder.

An activity code is used to:

  • Make an element optional 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

If the activity code is disabled:

  • The marked element will not be useable
  • The associated code will not be generated nor 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.

Grid

  • 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.

 

Fields

The following fields are present on this tab :

Grid

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

 

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)

 

  • Access code field (field ZACC)

 

  • 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.

Grid

  • 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 included on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

Use this field to define the folder from which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

  • All folders (field TOUDOS)

Use this option to copy the record to all the folders defined in the dictionary (ADOSSIER table of the current solution).

  • To folder (field DOSDES)

Use this field to define the folder to which the record will 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 menu item allows access to the documentation management on the first paragraph of the documentation (if there is one) associated with the current record.

Documentation / Links

This menu item allows access to link management. It is used to define the links between the current record and other records (for example, the links between functions and parameters). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu item launches a documentation generation. You can also launch it from the Generation button at the bottom of the screen.

You can launch three types of generation one by one or simultaneously

  • The generation of the documentation structure from the dictionary (ADOCUMENT, ADOCBLB, and ADOCCLB tables)
  • 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 you can modify it at launch time.

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