The documentation for the SUBSTRING function is inconsistent, incorrect in one place and poorly documented in the other.
EditSessionGroupPanel.Instructions text which is displayed when you press the Reference link in the Session Editor, as documented at https://docs.connectwise.com/ConnectWise_Control_Documentation/Get_started/Administration_page/Appearance_page/List_of_web_resource_strings
has an incorrect description for the example of the SUBSTRING function.
It incorrectly states: SUBSTRING(Name, 5, 4) = 'TEST': Sessions where characters 5-9 of the name are "TEST" (work-around for no wildcards in the middle)
This suggests that characters 5,6,7,8 and 9 will be returned. The function example shown would actually only return characters 5-8. (4 characters returned, starting from character 5, returning characters 5,6,7,8)
- The SUBSTRING function example
in the documentation is available here: https://docs.connectwise.com/ConnectWise_Control_Documentation/Get_started/Host_page/Session_groups/Session_groups_filter_reference
This explanation at least shows that character number 9 will not be included. Here it is stated as:
SUBSTRING(Name, 5, 4) = 'TEST' Sessions where characters 5 through 9 (not including 9) of the name are "TEST" (work-around for no wildcards in the middle)
The first explanation is just incorrect. The second explanation contradicts itself by stating that "characters .. through 9" are returned, which is clearly inclusive of 9, and then character 9 is stated as being excluded (which contradicts the meaning of the term "through").
Both explanations could be corrected by simply saying either:
SUBSTRING(Name, 5, 4) = 'TEST': Sessions where characters 5 through 8 of the name are "TEST"
SUBSTRING(Name, 5, 4) = 'TEST': Sessions where characters 5-8 of the name are "TEST"
Available in Version:
Customer support service by UserEcho