KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to check if an object property contains a blob
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: September 5, 2023

A blob can be stored in an object property, but since a property value cannot be blob type, using the command Value type on the blob property will return “Is object”. To verify that the property contains a blob, use the command OB Instance of and test it against the 4D.Blob class.

Example:

var $blob : Blob
$obj:={myBlob: $blob}
$isObject:=Value type($obj.myBlob) // 38 (Is Object)
$isBlob:=OB Instance of($obj.myBlob; 4D.Blob) // True (Is Blob)