4D v13

WR INSERT FIELD

Home

 
4D Write v13
WR INSERT FIELD

WR INSERT FIELD 


 

WR INSERT FIELD ( area ; numTable ; numField {; numFormat {; dateFormat {; timeFormat {; destination {; size}}}}} ) 
Parameter Type   Description
area  Longint in 4D Write area
numTable  Integer in Table number
numField  Integer in Field number
numFormat  String in Numeric format
dateFormat  Integer in Number of the date format
timeFormat  Integer in Number of the time format
destination  Longint in Place where picture is to be placed
size  Longint in 0=Size fixed, 1=Size adjusted

The WR INSERT FIELD command inserts a reference to a field into area, replacing any selected text. The field is described by the numTable and numField numbers. You can also specify the display format of inserted numeric, Date or Time fields.

The numFormat optional parameter indicates the format of numeric fields (i.e., Real, Integer, or Longint). It can contain any numeric display format, whether it exists or not (for example, “###,##”). Put an empty string when this parameter is not appropriate, or omit it if the following two parameters have been omitted.

The dateFormat optional parameter indicates the format of Date type fields. It must contain a number that indicates an existing date format. Put 0 when this parameter is not appropriate, or omit it if the following parameter has been omitted.
Otherwise, use the following 4D constants, found in the "Date Display Formats" theme of 4D and the WR Parameters theme of 4D Write:

Constant Type Value Comment
System date short Longint 1 12/29/2006
System date abbreviated Longint 2 Sun, Dec 29, 2006
System date long Longint 3 Sunday, December 29, 2006
Internal date short special Longint 4 12/29/06 (but 12/29/1896 or 12/29/2096)
Internal date long Longint 5 December 29, 2006
Internal date abbreviated Longint 6 Dec 29, 2006
Internal date short Longint 7 12/29/2006

Constant Type Value Comment
wr no date format Longint 0 No date format

The timeFormat optional parameter indicates the format of Time type fields. It must contain a number indicating an existing time format. Put 0 when this parameter is not appropriate or omit it.
Otherwise, use the following 4D constants, found in the "Time Display Formats" theme of 4D and the WR Parameters theme of 4D Write::

Constant Type Value Comment
HH MM SS Longint 1 01:02:03
HH MM Longint 2 01:02
Hour Min Sec Longint 3 1  hour 2 minutes 3 seconds
Hour Min Longint 4 1 hour 2 minutes
HH MM AM PM Longint 5 1:02 AM

Constant Type Value Comment
wr no time format Longint 0 No time format

When you insert a picture expression, the optional destination parameter indicates where the picture must be inserted into the document. You can choose any value more than 0 or one of the following constants, found in the "WR Parameters" theme:

Constant Type Value Comment
wr on left hand pages Longint -12 The picture will be inserted into the page and will be displayed on left-hand pages onlyif the even- and odd-numbered headers are different.
wr on right hand pages Longint -11 The picture will be inserted into the page and will be displayed on right-hand pages if the even- and odd-numbered headers are different, and otherwise on every page.
wr on current page Longint -4 The picture will be inserted on the page and visible on the current page (that containing the insertion point or the current selection).
wr into the text flow Longint 0 The picture will be inserted into the text flow. In this case the other parameters will not be used and the picture will either be inserted at the location of the insertion point or will replace the current selection.

Any value >0The picture is visible on the page number passed in destination. The value must take the start number into account.

When adding a picture expression, the optional size parameter sets whether the display rectangle will be kept or adjusted:

  • If you pass 1 in size, when the expression is calculated, the display rectangle is adjusted to the new picture size.
  • If you pass 0  in size, when the expression is calculated, the display rectangle is kept as is, regardless of the new picture size.

 
PROPERTIES 

Product: 4D
Theme: WR Database Objects
Number: 89228

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D Write 6.7
Modified: 4D Write v11.6

 
SEE ALSO 

WR GET REFERENCE
WR INSERT EXPRESSION