String manipulation functions (LEFT/RIGHT)

$$LEFT function

The Xink function $$LEFT is used to remove unwanted characters from the right side of a data entry in signatures. If you put this construction to the body of your signature, the system will check specified Field value and extract substring, starting with that left-most character ending with first separator value encounter.

This is the $$LEFT construction template:

{$$LEFT(Field, separator)$$}

The field is a field name and separator is a character or sequence of characters. Please keep the characters’ chain and spaces the same way as they are in the template. Their order and spaces allow the system to identify the condition $$LEFT and apply it properly.

Let’s look at some $$LEFT function examples to explore how to use function $$LEFT in signatures and also how to preview the results before publishing it on production.

Example 1:

{$$LEFT(Phone, x)$$}

Field – Phone, separator - x.

Put {$$LEFT(Phone, x)$$} condition to the body of the signature.

source1.jpeg

The Phone field value will be checked for x and the substring, starting from the left-most character to x will remain. Now, x155 is gone.

preview-dropdown.jpeg

Preview the results to be sure that the condition works as expected.
 Click the Preview tab, choose the employee in the drop-down list and check what you've got.

Example 2:

{$$LEFT(Phone, Ext.)$$}

Field – Phone, separator - Ext.

Put {$$LEFT(Phone, Ext.)$$} condition to the body of the signature.

The Phone field value will be checked for Ext. and the substring, starting from the left-most character to Ext. will remain. Now Ext. 35  is gone.

Preview the results.

$$RIGHT function

$$RIGHT function behaves the exact reverse way the $$LEFT one does. The only important difference is that $$RIGHT condition extracts the right part of the data entry, starting the next character after the first separator value encounter ending with the right-most character. As a result, the right-handed substring, which goes after the indicated separator in your condition, will be displayed for the specified field in your signature. The left substring, starting from the left-most character ending the first separator value encounter, will be removed by the condition and not rendered by the system.

This is the $$RIGHT construction template:

{$$RIGHT(Field, separator)$$}

The field is a field name and separator is a character or sequence of characters. Please don't forget to keep the characters’ chain and spaces the same way as they are in the template. Their order and spaces allow the system to identify the condition $$RIGHT and apply it properly.

Let's get some examples.

Example 1:

  

{$$RIGHT(Fax, ))$$}

Field – Fax, separator - ')'.

Put {$$RIGHT(Fax, ))$$} condition to the body of the signature.

The Fax field value will be checked for ) and the substring, starting right after ) to the right-most character will remain. Now (414) is gone.

preview-dropdown.jpeg

Preview the results to be sure that the condition works as expected.
 Click the Preview tab, choose the employee in the drop-down list and check what you've got.

Example 2:

{$$RIGHT(Website, ww.)$$} 

Field – Website, separator - 'ww.'

Put {$$RIGHT(Website, ww.)$$} condition to the body of the signature.

The Website field value will be checked for ww. and the substring, starting right after ww. to the right-most character will be saved while www. will be removed.

preview-dropdown.jpeg

Preview the results to be sure that the condition works as expected.
Click the Preview tab, choose the employee in the drop-down list and check what you've got.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
Quick 1-on-1 Demo | Ⓒ 2024 Xink