string Contain in X++ Ax 2012 str target; int found; str GeneralJournalAccountEntry _GeneralJournalAccountEntry; ; target=_GeneralJournalAccountEntry.LedgerAccount; found = strscan(target,"22222",found,strlen(target)); If (found!=0) { subtotal+=_GeneralJournalAccountEntry.AccountingCurrencyAmount; }