How to compare 2 arrays in Navision 2013.

Dear Expert,

How to compare two array in Navision 2013.

For ex:

I have saved one value(ABC)

and having array list from 1 to 9

Need to compare value(ABC) from Array list 1 to 9.

Please Suggest.


Shweta A.

This compares the values. But there are many other ways to do it.

FOR i := 1 to ARRAYLEN(Value) DO
  IF Value[i] <> Value2[i] THEN
    ERROR('Your values are different!');

Thanks Erik for the reply.

but I’m facing a problem with,

for eg. Value[I] = abc

value2[I] = abc@1234Xyz_09062018

system should (Value[I] = value2[I]) return the Boolean as true (because some of the content are exist)

but system fails in this condition.

how do we compare with same code if some of the content is also exist , then Boolean would be return as true.

Use the STRPOS function which will return a integer value if there is a value in the string. If 0 then the return value is false if not 0 then your value is found in the string.