KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Write Pro Object Attributes
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: May 15, 2019

4D Write Pro documents are handled using 4D's object type variables. Object type variables allow attributes and values to added to it. With a 4D Write Pro object custom attributes and values can be assigned to the 4D Write Pro object as long as the attribute is not a reserved attribute. This will allow additional details to be added to a WP object stored and even allow WP objects stored in a table field to have additional attributes to be queried upon.

Example:
On a form with a Write Pro Area with the object wpObj assigned to it the following code is ran:

C_OBJECT(wpObj)

wpObj:=WP New
wpObj.customAttribute:="4D"
WP SET TEXT(wpObj;"Hello World!";wk append)


The document is then properly displayed in the Write Pro area on the form