Changing Offset Base Expression Builder - 17.1

Inline Discovery

Version
17.1
Language
English
Product name
Trillium Discovery
Title
Inline Discovery

Offsets are used for the following three string functions in the Expression Builder:

  • INSSTR - Insert one string into another string at the specified offset.
  • OCCSTR - Parses a string to find the location of a substring and returns a numeric value equivalent to the position of the substring occurrence counted from the left of the string.
  • SUBSTR - Returns a substring which describes characters at the beginning, middle, or end of a string.

By default, offsets are 1-based (offset by 1), unless you are working with a project created in a legacy (pre-Version 13) project, in which case the results are 0-based. You can change the offset base value by editing the configuration file. For example, when you are importing a project created in pre-Version 13.0, or you know that your project is 0-based, you can change the offset base value from 1 to 0 by editing the configuration file.

To change the offset base value

  1. Close the Control Center.
  2. Stop the Scheduler service.
  3. Go to the Server installation directory and look for the etc folder. For example, if you selected the default directory during the Server installation, the etc folder is in /Version. Within that folder is the config.txt file.
  4. Open the config.txt file in a text editor.
  5. Locate the following setting:Key public {Value str_base 1}
  6. Change the default value of ‘1’ to ‘0.’
  7. Save and close the file.
  8. Restart the Scheduler service.
  9. Restart the Control Center. Next time you run the Quality project, the new offset base value is used.