Command WR BLOB TO AREA

4D Write

WR BLOB TO AREA

version 6.5


WR BLOB TO AREA (area; blob)

ParameterTypeDescription
areaLongint4D Write area
blobBLOBVariable or field that contains 4D Write data

Description

The WR BLOB TO AREA command loads into the 4D Write area area the contents of blob. The contents of the BLOB are assumed to be 4D Write data.

The contents of the Blob can either be data that was automatically saved from a 4D Write area associated by name with a BLOB, or data that was saved using the WR Area to blob command.

Examples

1. You want to load a template of letter which is stored in the "[Templates]Reference_" BLOB field and use it as the current template:

   QUERY([Templates];[Templates]Texts=Ref)
   If(Records in selection([Templates])>0)
      WR BLOB TO AREA(Area;[Templates]Reference_)
   End if

2. You want to copy the text stored in the "[Templates]TheText_" BLOB field and paste it in the current area on screen. This example shows you how to create an advanced glossary system:

   Temp:=WR New offscreen area
   WR BLOB TO AREA (Temp;[Templates]TheText_)    `Expanding the field
   WR EXECUTE COMMAND(Temp;wr cmd select all)
   WR EXECUTE COMMAND(Temp;wr cmd copy)
   WR DELETE OFFSCREEN AREA (Temp)    `Deleting the area
   WR EXECUTE COMMAND(Area;wr cmd paste)    `Executing the Paste menu command

Note: If you store the 4D Write areas into Picture fields, please refer to the description of the command WR PICTURE TO AREA.

See Also

WR Area to blob.