ERROR

Dear all,

Im getting an error Type conversion is not possible because 1 of the operators contains an invalid type.

char : = text

IN C/AL GLOBALS had given AddressData datatype : text

In After Get Record had given

CLEAR(AddressData);

AddressData[1] := “Bill-to Name”;

AddressData[2] := “Bill-to Address”;

AddressData[3] := “Bill-to Address 2”;

AddressData[4] := “Bill-to Address 3”;

AddressData[5] := “Bill-to Address 4”;

With regards,

R.Ramanathan

Have you defined the dimension of AddressData as 5?

You should have Dimension as 5 in this case, check in C/AL Globals, select your variable AddressData, go to Properties (Shift + F4) and check the value of Dimension.

I believe the first response is correct.

If AddressData is a string, then each letter in that string is a character. You access these characters using standard array notation, AddressData[index]. Essentially you are trying to store a text value in a spot that can only hold one character.

Changing the dimensions on the variable will solve this. In that case the first index you provide refers to the index of the array, while the second optional index refers to the character in the string.

Hope that makes sense.