Map and boolean

Hi all,
i just started using maps and i have a question. I want to build a map to use it for the args-object (e.g. args.parmObject(MyMap)…).
But it seems that boolean-values do not work here (and the map should contain a string, an int and a boolean…).

Any help would be great!

This is a small piece of test-code - i retrieve an exception in the line “bTest = mapItems.lookup(‘boolTest’);”:

static void FP_Test04(Args _args)
    Map mapItems;
    boolean bTest;
    mapItems = new Map(Types::String, Types::AnyType);
    mapItems.insert('boolTest', true);
    bTest = mapItems.lookup('boolTest'); //EXCEPTION
    if (bTest) {
        // Do something...

Thanks in advance,

Hi Frank,

AX handles boolean values as integers, so try replace map initialization with this:

mapItems = new Map(Types::String, Types::Integer);



thanks for the answer. But i want to pass strings, integers and boolean values to the map. That’s why i choose “AnyType”…