LogiView

Command 'insert_typ'

     

This command opens a virtual widget in the list mask of the specified type in which records are to be inserted. See also 'iwf_lis_ent' DataView function.

This command must not be called in a conditional instruction.

If the command is called without a transfer string - i.e. just 'insert_ent()' - all corresponding records in the mask of the currently active widget are copied and saved.

Using the 'var' command, the variables to be used (and this the table fields to be filled in) are defined.

The nested use of commands may lead to problems. This is the case when exactly the same parameter strinb is used.
Example
 

Syntax:

  insert_typ({STR_EXPR| })
 

I/O parameters:

{STR_EXPR} Name of Entity 1 <space> Name of type <space> Name of list mask
-  
 

Return value:

 
-  
 

Example:

  Declaration of Variables
 
10 insert_typ("EDB-DOCUMENT DRAWING")

20 where_ent()

30 DOCU_INT_1=execute(1)
 

Result:

A record of type 'Drawing' is created.

If values are to be copied to the record at the same time, the 'iwf_lis_typ' userexit must be used.
 
 10 C --- Content is a Report	

 20 DOCU_STRING_2_DB = "REPORT-270899"	

 30 C --- Create document of type TEXTFILE	

 40 virtual(TRUE)	

 50 DOCU_INT_1 = @iwf_lis_typ("EDB-DOCUMENT TEXTFILE")	

 60 if (DOCU_INT_1 == 0)	

 70   DOCU_INT_2 = widget_id()	

 80   insert_typ()	

 90   var (DOCU_STRING_2_DB)	

100 where_ent()	

110   DOCU_INT_3 = execute(1)

120 endif	

130 virtual(FALSE)	
 

Result:

In this example, a new text file type record with document ID 'REPORT_270899' has been created.

Functions and commands: DB / Mask Interface