Expressions - Strings

Overview
Expressions described below are used for setting or amending the string value of a field. These can be used in various sections of Linnworks such as imports, exports and template designer.

ExpressionFormatDescription
Concatenation concat[p1, ..., pn] This operand function concatenates the parameters together to make a string
Contains contains[p1, p2, ...., pn] If p1 is in the list p2, ..., pn this function returns "true" otherwise, this function returns "false". Indicates if the item is contained in the list
Double Quote quote[] Returns a double quote
Index Of indexof[a, b1, ..., bn] If the list b1, ..., bn contains the value a, the index of the value is returned, otherwise, -1 is returned. Please note that this is zero based indexing
Join join[a, b1, ..., bn] Where a is the delimiter and b1, ..., bn are the items to be joined. Joins a list of items together using a delimiter
Left left[s, n] Where s is the string and n is the number of characters. Returns the left number of characters from a string parameter
Left Pad lpad[a, b, n] Where a and b are string values and n is numeric. The parameter p will be appended to the left of parameter a, n times. Pads a string on the left with new values
Left Trim ltrim[a] Trims the spaces from the left of a string
Length len[a] Where a is a string variable or literal. Returns the number of characters in the string
Lower Case LCase[a] Converts a string to lower case
Maximum StringMax[p1, ..., pn] Finds the string with the most number of characters in the list
Minimum StringMin[p1, ..., pn] Finds the string with the least number of characters in the list
Proper Case pcase[a] Where a is a string. Converts a string to Proper Case. For example, the proper case of "buFFalo" "Buffalo"
Remove remove[a, b] Where a and b are strings. Removes the specified characters from the string
Replace Replace[a, b, c] Where a is the search string, b is the value being replaced, and c is the value that is being inserted. Replaces one string with another string
Right right[s, n] Where s is the string and n is the number of characters. Returns the number of characters n, starting with the last character
Right Pad rpad[a, b, n] Where a and b are string values and n is numeric. The parameter b will be appended to the right of parameter a, n times. Pads a string on the right with new values
Right Trim rtrim[a] Trims the spaces from the right of a string
Search String SearchString[a, n, b] Where a is the string that is being searched, b is the string that is being sought, and n is the start position in a.
Searches for a string within another string at a specified starting position
Sub String SubString[s, a, b] Where s is the string, a is the starting point, and b is the number of characters extracted. Extracts a substring from a string
Trim trim[a] Trims the spaces from the entire string. Please note that it does not remove spaces from the text itself, it only removes spaces from the start and the end of the string. In order to remove spaces from the text, please consider using replace[]
Upper Case ucase[a] Converts a string to upper case

Additional Types