Dictionary and Variant
Hi,
I do have a "Variable Register" that is a Dictionary containing different values.
var
VariableRegister : Dictionary of [Text, Text];
is possible. I need to add Date, DateTime, Integer, ... etc values, therefore i'm in need to use variant
var
VariableRegister : Dictionary of [Text, Variant];
which is not possible. I want to avoid creating a Dictionary for every field type (Date, DateTime, Integer, Decimal, Text, GUID, ...)
(In C/SIDE i used a DotNet Dictionary and added the Variant values)
We currently have a limitation on the times that can be used in Dictionary - same limitation as for what types can be returned from a method.
This is rooted in the runtime and we would like to remove it in the future. It is related to the lifetime of nav-objects and requires some rework in the runtime.
Thank you for you answer, esbenk. So for now i have to create a dictionary for all field types? :( Alternatively i can use a XML converted string and store additionally the pre-conversion-type. But that makes it all much more complicated and performance consuming. Also, i think this won't work well for streams (necessary to convert base64) of BLOB or Media/Set fields.
Unfortunately yes. We would like to change the platform to support this in the future and at the same time allow more return types from methods.