KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: OB SET ARRAY accepts single non-array values
PRODUCT: 4D | VERSION: 15.x | PLATFORM: Mac & Win
Published On: February 23, 2017

OB SET ARRAY accepts single non-array values as well as arrays. For example, if an text element is passed, the object's property will be converted to a text array with one element.

C_OBJECT($obj)
C_TEXT($text)

$text:="abc"
OB SET ARRAY ($obj;"Property";$text)

$obj will be:
{"Property":["abc"]}