Better support for Object data type
2214
Views
3
Comments
On our RadarOn our Radar
Backend

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.

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.

Great idea, at the moment to get around this I am using the serialize and deserialize but this won't work for all cases. Having this Object functionality will allow easier transferring of data using the JS widget also.