Al: Feature request: An kind of .NET Dictionary replacement as a new data type

Created on 15 Sep 2017  路  3Comments  路  Source: microsoft/AL

We have repeatedly used the .NET Dictionary in our developments to work with data in memory. The advantage over the ARRAY is that it is not lengthbound and a key check takes place. It is also very easy to check whether data exists with the function "Contains". In theory, you could also use a temporary table. Unfortunately, there is still the limitation for text of max. 250 characters. This is not practical for a temporary storage. Even the dissolution of these restrictions would perhaps help here. Would it be possible to provide such a construct as a new data type like the new XML and JSON data types or the TextBuilder?

question

Most helpful comment

Ah no, sorry, coming in October Update:)

All 3 comments

It's actually there since September Update. Try the following snippet:

codeunit 50107 MyCodeunit
{
  trigger OnRun();
  var
    dict : Dictionary of [Text, Integer];
  begin
    dict.Add('TextKey', 33);
  end;
}

Ah no, sorry, coming in October Update:)

@StanislawStempin
That's great news that this will be released in the next version. You could almost speak of a transfer of thought on this subject. Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings