Better support for Object data type

On our radar

The Object data type can be used to communicate data to and from extensions, but isn't much of use otherwise. Furthermore, it is not possible to use an Object as attribute in a structure, and I'm not sure whether Objects should be possible in a List (they are, but kinda via a workaround, even as attribute). Also, many Forge components dealing with generic data force the user to use RecordLists, as there's no other way to alter data in an extension. My proposal:

1) Allow structure attributes of type Object;

2) Officially allow Lists (and Record Lists) of type Object;

3) Have a FromObject function that reverses ToObject (and throws an exception when incompatible types are used), so extensions that manipulate generic data (e.g. XML Records) can output Records as well as Lists.

An Object will never be a "first class citizen", but they have their uses, and the proposals above would make the life of the advanced developer a little bit better when dealing with abstract data.

Created on 20 Feb 2017
Comments (2)

This. I want to be able to use Object from Javascript for an easy to use array in outsystems, so i could make make a list object in my eSpace with values from Object.

Great idea... I was just trying to figure out how I can use a HashTable (with Advanced Hashtable extension) to store Lists of a specific structure, then retrieve the value (which is an Object), and convert that Object back to the List of specific structure.