KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Procedurally saving a record containing a 4D Area
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: June 27, 2002

Compatibility: 6.5.x , 6.7.x, and 6.8.x

If you have created a plug-in area on a form and have created a Picture or BLOB field to store the area’s contents, any modification to the area is automatically saved by 4D with each record when the record is accepted. However, be aware that if you are trying to save the record yourself procedurally, the area is not automaticaly saved by 4D to the picture or BLOB field. Simply calling "Save Record([Table 1]" will not save the contents of the area to the field.

In order for the area's contents to be saved, you must convert the area in question to a BLOB or a picture, depending on the field type you selected, and then assign it to the field.


Let's take a quick look at an example for a 4D Write Area:

`Before calling save record,
`we convert the area to a blob
$Blob_area:=WR Area to blob (area1)
[Table 1]Area1_:=$Blob_area `assign the blob to the field
SAVE RECORD([Table 1])