Mar 9, 2015

How to get integers from X++ string value

static void intCheck(Args _args)
{
#define.lineIncrement(1)
int64 lineConfirm;
str _text;
str _lineConfirm = 'ECM-00451';

lineConfirm = str2Int64(strKeep(_lineConfirm, "0123456789"));

_text = strRem(_lineConfirm, strFmt("%1",lineConfirm));

lineConfirm = lineConfirm+#lineIncrement;
_lineConfirm = _text+ strFmt("%1",lineConfirm);

info(strFmt("%1",_lineConfirm));
}

No comments: