How do I check if a string contains another string

HI,

I am looking for a string contains function. For instance, I need t o check the following -

str x = “ABC”;

str y = “MY_ABC_TEXT”;

I need to check if the value of str x “ABC” is in str y “MY_ABC_TEXT”.

I am looking for all the strings can be manipulated in AX

Thanks,

K

1 Like

tried strfind ?

1 Like

Actually, I just need to return a boolean. I do not know what position it may appear

Hi Mr.Kumar

Pls try this…

if(strScan(Y,X,1,strLen(Y)))

return true;

return false;

Best Regards

1 Like

Yes, thanks Ishak - It worked