You are here: All Help Topics > Accounting and Assurance > Calculations, Functions and Linkages > SCANSTR function
-- Reference --

SCANSTR function

The SCANSTR function evaluates the position of one string value (value 1) within another string value (value 2).

SCANSTR(value 1, value 2)

  • SCANSTR("Ontario","Toronto, Ontario")

    Returns a value of 10.

  • SCANSTR("Alberta","Toronto, Ontario")

    Returns a value of 0.

SCANSTR(DATABASE -> FIELD, string), OPERATORVALUE

If the SCANSTR function finds the matching string, it returns a value for the position of that string. Therefore, if the string exists in a field the value returned will NOT be 0. Therefore a filter,

  • SCANSTR(GL->JE_DESC,"BUDGET")>0

    Returns any journal with a description line that contains, and matches exactly, the text string "BUDGET". The IN function could be used in the same way.

Related Topics