# Advanced Modifiers

**ADVANCED MODIFIERS**

**Advanced Modifiers indicate a secondary and more developer-friendly approach to modify data.**

There are two accepted formats for using advanced modifiers:

* **Format 1 (***Keyword arguments***):** Specifying parameter names while passing values

```
Example:
ARRAY_APPEND([1,2,3], element=5) (or)
ARRAY_APPEND(source=[1,2,3], element=5)
```

* **Format 2:** Without mentioning parameter names

```
Example:
ARRAY_APPEND([1,2,3], 5)
Note:
String must be passed by enclosing the data in single or double quotes.
GROUP and EXPRESSION are deprecated.
```

## Description of Various Modifiers

### **ARRAY\_APPEND**

**DESCRIPTION**

Adds an element at the end of the array.

*Note: If source is not a list, it returns source.*

**SYNTAX**

```
ARRAY_APPEND(source*,element*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                           |
| -------- | -------- | --------------------------------------------------------- |
| source   | list     | Source field - array in which elements are to be appended |
| element  | any      | Element to be added at the end of source list             |

**EXAMPLE**

| **Source Data**                   | **Expression**              | **Output**                         |
| --------------------------------- | --------------------------- | ---------------------------------- |
| menu = \["chocolates","biscuits"] | ARRAY\_APPEND(menu,"cakes") | \["chocolates","biscuits","cakes"] |

### **ARRAY\_EXTEND**

**DESCRIPTION**

Returns extended list if source and element are lists, else appends the element to the list.

**SYNTAX**

```
ARRAY_EXTEND(source*,element*,default)
```

**PARAMETER**

| **Name** | **Type**                             | **Description**                              |
| -------- | ------------------------------------ | -------------------------------------------- |
| source   | list                                 | Source field - array which is to be extended |
| element  | list/ int/ float/ dictionary/ string | Element to be extended to the source list    |
| default  | string                               | Default value: "NOT\_IN\_SOURCE"             |

**EXAMPLES**

| **Source Data**                                                                     | **Expression**                         | **Output**                                      |
| ----------------------------------------------------------------------------------- | -------------------------------------- | ----------------------------------------------- |
| <p>menu = \["chocolates","biscuits"]</p><p>new\_items = \["cakes","ice creams"]</p> | ARRAY\_EXTEND(menu,element=new\_items) | \["chocolates","biscuits","cakes","ice creams"] |
| <p>menu="chocolates"</p><p>new\_items =\["cakes","ice creams"]</p>                  | ARRAY\_EXTEND(menu,new\_items)         | \["chocolates","cakes","ice creams"]            |

### **ARRAY\_INSERT**

**DESCRIPTION**

Adds an element at the specified index of the list. If the index is not mentioned, the element is added at the zeroth index.

**SYNTAX**

```
ARRAY_INSERT(source*,element*,index)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                                              |
| -------- | -------- | ---------------------------------------------------------------------------- |
| source   | list     | Source field - array in which element has to be inserted                     |
| element  | any      | Element to be inserted in the list                                           |
| index    | integer  | <p>Index at which the element has to be inserted.</p><p>Default value: 0</p> |

**EXAMPLES**

| **Source Data**                   | **Expression**                | **Output**                         |
| --------------------------------- | ----------------------------- | ---------------------------------- |
| menu = \["chocolates","biscuits"] | ARRAY\_INSERT(menu,"cakes",1) | \["chocolates","cakes","biscuits"] |
| menu = \["chocolates","biscuits"] | ARRAY\_INSERT(menu,"cakes")   | \["cakes","chocolates","biscuits"] |

### **ARRAY\_PUSH**

**DESCRIPTION**

Returns a list containing the input.

Note: ignore\_none must be used only as a keyword argument

**SYNTAX**

```
ARRAY_PUSH(args*,ignore_none)
```

**PARAMETER**

| **Name**     | **Type** | **Description**                                                 |
| ------------ | -------- | --------------------------------------------------------------- |
| args         | any      | <p>n source fields (n>=1)</p><p>Data to be pushed into list</p> |
| ignore\_none | boolean  | Indicates whether None should be taken into account or not      |

**EXAMPLES**

| **Source Data**                                   | **Expression**                                        | **Output**                                |
| ------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------- |
| company="DCKAP"                                   | ARRAY\_PUSH(company)                                  | \["DCKAP"]                                |
| <p>company="DCKAP"</p><p>product="INTEGRATOR"</p> | ARRAY\_PUSH(company,product)                          | \["DCKAP","INTEGRATOR"]                   |
| <p>company="DCKAP"</p><p>product="INTEGRATOR"</p> | ARRAY\_PUSH(company,product,sample)                   | \["DCKAP","INTEGRATOR","NOT\_IN\_SOURCE"] |
| <p>company="DCKAP"</p><p>product="INTEGRATOR"</p> | ARRAY\_PUSH(company,product,sample,ignore\_none=True) | \["DCKAP","INTEGRATOR"]                   |

### **ARRAY\_REMOVE**

**DESCRIPTION**

Returns the list after removing the element if the element is mentioned.

(i) If index is only mentioned,

* Returns the list after removing the element at the specified index if it is a valid index.
* Returns source if the index is out of range.

(ii) If element is only mentioned,

* Returns the list after removing the element mentioned if the element is present in the list.
* Returns source if the element is not in the list.

(iii) If both element and index are mentioned,

* Returns the list after removing the specified element if present (ignoring the index).
* Returns source if the specified element is not in the list.

(iv) If both element and index are not mentioned,

* Returns the list after removing the element at zeroth index.

(v) If source is not a list,

* Returns source.

**SYNTAX**

```
ARRAY_REMOVE(source*,element,index)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                           |
| -------- | -------- | --------------------------------------------------------- |
| source   | list     | Source field - array from which element has to be removed |
| element  | any      | Element to be removed                                     |
| index    | int      | Index of the element to be removed                        |

**EXAMPLES**

| **Source Data**                  | **Expression**                   | **Output**             |
| -------------------------------- | -------------------------------- | ---------------------- |
| item\_ids=\[1001,1002,1003,1004] | ARRAY\_REMOVE(item\_ids,1003)    | \[1001,1002,1004]      |
| item\_ids=\[1001,1002,1003,1004] | ARRAY\_REMOVE(item\_ids,index=2) | \[1001,1002,1004]      |
| item\_ids=\[1001,1002,1003,1004] | ARRAY\_REMOVE(item\_ids,2)       | \[1001,1002,1003,1004] |
| item\_ids=\[1001,1002,1003,1004] | ARRAY\_REMOVE(item\_ids)         | \[1002,1003,1004]      |
| item\_ids=\[1001,1002,1003,1004] | ARRAY\_REMOVE(item\_ids,1001,3)  | \[1002,1003,1004]      |
| item\_ids=\[1001,1002,1003,1004] | ARRAY\_REMOVE(item\_ids,1005)    | \[1001,1002,1003,1004] |

### **CAPITALIZE**

**DESCRIPTION**

Returns string with the first character of the string converted to capital (uppercase) letter while making all other characters in the string as lowercase letters.

*Note: Returns source if source is not a string*

**SYNTAX**

```
CAPITALIZE(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                   |
| -------- | -------- | --------------------------------- |
| source   | string   | Source field - data to capitalize |

**EXAMPLE**

| **Source Data** | **Expression**   | **Output** |
| --------------- | ---------------- | ---------- |
| name="ironman"  | CAPITALIZE(name) | "Ironman"  |

### **CONCATENATE**

**DESCRIPTION**

Returns a string by joining the user inputs (with the mentioned join character, if any).

Note: join\_chars must be used only as keyword argument

**SYNTAX**

```
CONCATENATE(args*,join_chars)
```

**PARAMETER**

| **Name**    | **Type** | **Description**                                                                                                |
| ----------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| args\*      | string   | <p>n source fields (n>=1)</p><p>Fields to be joined</p>                                                        |
| join\_chars | string   | <p>The string that must appear between the sources when the source fields are joined.<br>Default Value: ''</p> |

**EXAMPLES**

| **Source Data**                                                        | **Expression**                                      | **Output**               |
| ---------------------------------------------------------------------- | --------------------------------------------------- | ------------------------ |
| <p>name="integrator"</p><p>connector="@"</p><p>domain ="dckap.com"</p> | CONCATENATE(name,connector,domain)                  | "<integrator@dckap.com>" |
| <p>first\_name="Iron"</p><p>last\_name="Man"</p>                       | CONCATENATE(first\_name,last\_name,join\_chars=" ") | "Iron Man"               |

### **CONVERT\_TIME**

**DESCRIPTION**

Converts time from 12 hrs format to 24 hrs format and vice versa

**SYNTAX**

```
CONVERT_TIME(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                     |
| -------- | -------- | ----------------------------------- |
| source   | string   | Source Field - time to be converted |

**EXAMPLES**

| **Source Data**           | **Expression**             | **Output**    |
| ------------------------- | -------------------------- | ------------- |
| created\_at='11:37:00 pm' | CONVERT\_TIME(created\_at) | "23:37:00"    |
| created\_at='23:37:00'    | CONVERT\_TIME(created\_at) | "11:37:00 PM" |

### **CONVERTER**

**DESCRIPTION**

Looks for source in keys of converters dictionary and returns the corresponding value.

**SYNTAX**

```
CONVERTER(source*,converters*)
```

**PARAMETER**

| **Name**                                  | **Type**   | **Description**                                                                     |
| ----------------------------------------- | ---------- | ----------------------------------------------------------------------------------- |
| source                                    | string     | Source field - key which needs to be replaced with value from converters dictionary |
| converters (editable key-value pair icon) | dictionary | Reference dictionary from which the value of source is to be retrieved              |

**EXAMPLES**

| **Source Data**          | **Converters**                                                              | **Expression**                | **Output**           |
| ------------------------ | --------------------------------------------------------------------------- | ----------------------------- | -------------------- |
| country="United States"  | {"India":"+91","United States":"+1"}                                        | CONVERTER(country,converters) | "+1"                 |
| country="United Kingdom" | {"India":"+91","United States":"+1"}                                        | CONVERTER(country,converters) | "NOT\_IN\_SOURCE"    |
| country="United Kingdom" | {"India":"+91","United States":"+1","\_\_default\_\_":"Data Not Available"} | CONVERTER(country,converters) | "Data Not Available" |

### **COUNT**

**DESCRIPTION**

Returns the length of source;

Returns zero, if the source is of invalid datatype.

**SYNTAX**

```
COUNT(source*)
```

**PARAMETER**

| **Name** | **Type**               | **Description**                                    |
| -------- | ---------------------- | -------------------------------------------------- |
| source   | string/list/dictionary | Source field for which length has to be calculated |

**EXAMPLES**

| **Source Data**                                     | **Expression**        | **Output** |
| --------------------------------------------------- | --------------------- | ---------- |
| items=\[100,200,300]                                | COUNT(items)          | 3          |
| country\_codes={"India":"+91","United States":"+1"} | COUNT(country\_codes) | 2          |

### **DATATYPE\_CONVERTER**

**DESCRIPTION**

Converts the input to requested datatype

**SYNTAX**

```
DATATYPE_CONVERTER(source*,datatype)
```

**PARAMETER**

| **Name** | **Type**                    | **Description**                                                                       |
| -------- | --------------------------- | ------------------------------------------------------------------------------------- |
| source   | any                         | Source field which has to be converted                                                |
| datatype | int,float,boolean,list,dict | Datatype to which source has to be converted. Can be provided with quotes like 'int'. |

**EXAMPLES**

| **Source Data**                                     | **Expression**                             | **Output**                 |
| --------------------------------------------------- | ------------------------------------------ | -------------------------- |
| country\_codes={"India":"+91","United States":"+1"} | DATATYPE\_CONVERTER(country\_codes,’list’) | \["India","United States"] |
| price=100.123                                       | DATATYPE\_CONVERTER(price,int)             | 100                        |

### **DATETIME\_FORMATTER**

**DESCRIPTION**

Formats the datetime (object or string) to user specified string date format.

**SYNTAX**

```
DATETIME_FORMATTER(source*,requested_format,default)
```

**PARAMETER**

| **Name**          | **Type**                | **Description**                                        |
| ----------------- | ----------------------- | ------------------------------------------------------ |
| source            | Datetime object/ string | Source field to be converted into the requested format |
| requested\_format | string                  | Desired format of time                                 |
| default           |                         |                                                        |

**EXAMPLE**

| **Source Data**                               | **Expression**                                          | **Output**               |
| --------------------------------------------- | ------------------------------------------------------- | ------------------------ |
| created\_at='Sat, 27 Jan 2018 17:16:55 +0000' | DATETIME\_FORMATTER(created\_at,'%Y-%m-%d %I:%M:%S %p') | '2018-01-27 05:16:55 PM' |

### **DECODE**

**DESCRIPTION**

Decodes the encoded string (codec registry)

**SYNTAX**

```
DECODE(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                         |
| -------- | -------- | --------------------------------------- |
| source   | bytes    | Source field - bytes data to be decoded |

**EXAMPLE**

| **Source Data**        | **Expression** | **Output** |
| ---------------------- | -------------- | ---------- |
| secret=b'St\xc3\xa5le' | DECODE(secret) | 'Ståle'    |

### **EMAIL\_VALIDATOR**

**DESCRIPTION**

Returns the email address if valid, else default

**SYNTAX**

```
EMAIL_VALIDATOR(source*,default)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                                                    |
| -------- | -------- | ---------------------------------------------------------------------------------- |
| source   | string   | Source field - email to be validated                                               |
| default  | string   | <p>Value to display if email is invalid</p><p>Default value: "NOT\_IN\_SOURCE"</p> |

**EXAMPLES**

| **Source Data**                        | **Expression**                                   | **Output**               |
| -------------------------------------- | ------------------------------------------------ | ------------------------ |
| contact\_mail="<integrator@dckap.com>" | EMAIL\_VALIDATOR(contact\_email)                 | "<integrator@dckap.com>" |
| contact\_mail="integrator"             | EMAIL\_VALIDATOR(contact\_email)                 | "NOT\_IN\_SOURCE"        |
| contact\_mail="integrator"             | EMAIL\_VALIDATOR(contact\_email,"Invalid email") | "Invalid email"          |

### **ENCODE**

**DESCRIPTION**

Encodes the string (codec registry)

**SYNTAX**

```
ENCODE(source)
```

**PARAMETER**

| **Name** | **Type** | **Description**            |
| -------- | -------- | -------------------------- |
| source   | string   | Source field to be encoded |

**EXAMPLE**

| **Source Data** | **Expression** | **Output**      |
| --------------- | -------------- | --------------- |
| secret='Ståle'  | ENCODE(secret) | b'St\xc3\xa5le' |

### **ENDSWITH**

**DESCRIPTION**

Returns true if the string ends with the mentioned suffix in the specified index range else False. Returns false if source is not a string.

**SYNTAX**

```
ENDSWITH(source*,suffix*,start,end)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                              |
| -------- | -------- | ------------------------------------------------------------ |
| source   | string   | Source field                                                 |
| suffix   | string   | Suffix string with which the check on source has to be made. |
| start    | integer  | Start index of the string                                    |
| end      | integer  | End index of the string                                      |

**EXAMPLES**

| **Source Data**     | **Expression**             | **Output** |
| ------------------- | -------------------------- | ---------- |
| message="Great Day" | ENDSWITH(message,"ay")     | true       |
| message="Great Day" | ENDSWITH(message,"ay",1,5) | false      |

### **FIND\_AND\_MATCH**

**DESCRIPTION**

For the given source dictionary,

Returns result\_key if the value of find\_key is check\_value.

Returns default otherwise.

**SYNTAX**

```
FIND_AND_MATCH(source*,find_key*,check_value*,result_key*,default)
```

**PARAMETER**

| **Name**     | **Type**   | **Description**                                                                                                                    |
| ------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| source       | dictionary | Source field                                                                                                                       |
| find\_key    | string     | Key to search in source dictionary                                                                                                 |
| check\_value | any        | Value to check for find\_key                                                                                                       |
| result\_key  | string     | Key whose value is to be returned as result                                                                                        |
| default      | string     | <p>String to display in absence of find\_key or result\_key or a different check\_value</p><p>Default Value: "NOT\_IN\_SOURCE"</p> |

**EXAMPLES**

| **Source Data**                                       | **Expression**                                                              | **Output**           |
| ----------------------------------------------------- | --------------------------------------------------------------------------- | -------------------- |
| signatures= {"Subject":"Request", "Sign":"Sincerely"} | FIND\_AND\_MATCH(signatures,"Subject",'Request','Sign')                     | "Sincerely"          |
| signatures= {"Subject":"Request", "Sign":"Sincerely"} | FIND\_AND\_MATCH(signatures,"Subject",'Friend','Sign','Data not available') | "Data not available" |

### **IFELSE**

**DESCRIPTION**

If the condition is satisfied, it executes on\_success, else runs on\_fail.

**SYNTAX**

```
IFELSE(condition,on_success,on_fail)
```

**PARAMETER**

| **Name**    | **Type**                 | **Description**                                          |
| ----------- | ------------------------ | -------------------------------------------------------- |
| condition   | field/another expression | Field or expression to be checked for some value         |
| on\_success | field/another expression | If value exists, field/expression to be returned         |
| on\_fail    | field/another expression | If value does not exist, field/expression to be returned |

**EXAMPLES**

| **Source Data**                                  | **Expression**                                                                          | **Output** |
| ------------------------------------------------ | --------------------------------------------------------------------------------------- | ---------- |
| company\_name='DCKAP'                            | IFELSE(company\_name,company\_name,'INTEGRATOR')                                        | "DCKAP"    |
| <p>first\_name="Iron"</p><p>last\_name="Man"</p> | IFELSE(company\_name,company\_name,CONCATENATE(first\_name,last\_name),join\_chars=" ") | "Iron Man" |

{% hint style="info" %}
IFELSE supports additional capabilities to check conditions with the operators <, <=, >, >=, ==, !=

***Examples:***&#x20;

IFELSE(AGE>=18,"Yes","No")

IFELSE(COUNT('ABC')>=COUNT(LSTRIP(" ABC")),UPPER(first\_name),"No Name")
{% endhint %}

### **IGNORE\_ASCII**

**DESCRIPTION**

Returns string after removing Unicode characters.

Returns source if the source is not a string.

**SYNTAX**

```
IGNORE_ASCII(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                              |
| -------- | -------- | ------------------------------------------------------------ |
| source   | string   | Source field from which Unicode characters are to be removed |

**EXAMPLE**

| **Source Data** | **Expression**      | **Output** |
| --------------- | ------------------- | ---------- |
| name='Škoda'    | IGNORE\_ASCII(name) | 'koda'     |

### **ISLOWER**

**DESCRIPTION**

For string, returns true if all the alphabets are lowercase(a-z) else returns false.

Note: If source is not a string, return false.

**SYNTAX**

```
ISLOWER(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                     |
| -------- | -------- | ----------------------------------- |
| source   | string   | Source field which is to be checked |

**EXAMPLE**

| **Source Data**      | **Expression**    | **Output** |
| -------------------- | ----------------- | ---------- |
| category="chocolate" | ISLOWER(category) | true       |

### **ISUPPER**

**DESCRIPTION**

For string, returns true if all the alphabets are uppercase(A-Z) else returns false.

If source is not a string, it returns false.

**SYNTAX**

```
ISUPPER(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                     |
| -------- | -------- | ----------------------------------- |
| source   | string   | Source field which is to be checked |

**EXAMPLE**

| **Source Data**      | **Expression**    | **Output** |
| -------------------- | ----------------- | ---------- |
| category="chocolate" | ISUPPER(category) | false      |

### **LJUST**

**DESCRIPTION**

Left aligns the string, using a specified character (space is default) as the fill character for making the length of the output string as the mentioned width.

Note: Returns source, if source is not a string.

**SYNTAX**

```
LJUST(source*,width*,fillchar)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                                                                |
| -------- | -------- | ---------------------------------------------------------------------------------------------- |
| source   | string   | Source Field                                                                                   |
| width    | integer  | Length of the output                                                                           |
| fillchar | string   | <p>String to make the text to the desired width and left justified</p><p>Default value:' '</p> |

**EXAMPLES**

| **Source Data** | **Expression**        | **Output**   |
| --------------- | --------------------- | ------------ |
| message='hello' | LJUST(message,10)     | 'hello '     |
| message='hello' | LJUST(message,10,'-') | 'hello-----' |

### **LOWER**

**DESCRIPTION**

Converts all uppercase characters in the string to lowercase

**SYNTAX**

```
LOWER(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                             |
| -------- | -------- | ------------------------------------------- |
| source   | string   | Source field to be converted into lowercase |

**EXAMPLES**

| **Source Data** | **Expression** | **Output** |
| --------------- | -------------- | ---------- |
| gender='Male'   | LOWER(gender)  | 'male'     |

### **LSTRIP**

**DESCRIPTION**

Returns a copy of string with leading prefix characters removed.

If no prefix is passed, it removes leading spaces.

Note: If source is not a string, returns source.

**SYNTAX**

```
LSTRIP(source*,prefix)
```

**PARAMETER**

| **Name** | **Type** | **Description**       |
| -------- | -------- | --------------------- |
| source   | string   | Source field          |
| prefix   | string   | String to be stripped |

**EXAMPLES**

| **Source Data**    | **Expression**   | **Output** |
| ------------------ | ---------------- | ---------- |
| city=' Chennai'    | LSTRIP(city)     | 'Chennai'  |
| city='XXXXChennai' | LSTRIP(city,'X') | 'Chennai'  |

### **MATH**

**DESCRIPTION**

Performs arithmetic operations and returns the result.

Note: operator must be used only as keyword argument

**SYNTAX**

```
MATH(args*,operator*)
```

**PARAMETER**

| **Name** | **Type**                         | **Description**                          |
| -------- | -------------------------------- | ---------------------------------------- |
| args     | int/float                        | Two Source fields to be given (operands) |
| operator | '+','-','\*','/','\*\*','%','//' | Operation to be performed                |

**EXAMPLES**

| **Source Data**                    | **Expression**                     | **Output** |
| ---------------------------------- | ---------------------------------- | ---------- |
|                                    | MATH(10,3,operator='\*\*')         | 1000       |
| <p>price=100,</p><p>quantity=5</p> | MATH(price,quantity,operator='\*') | 500        |

### **NOW**

**DESCRIPTION**

Current datetime will be returned based on timezone.

**SYNTAX**

```
NOW()
```

**EXAMPLE**

| **Source Data** | **Expression** | **Output**                 |
| --------------- | -------------- | -------------------------- |
|                 | NOW()          | 2022-02-04 09:26:59.624294 |

### **PARTITION**

**DESCRIPTION**

Splits the string at the first occurrence of the separator and returns a tuple containing the part before the separator, separator, and the part after the separator.

Note: If the input is not a string, returns string.

**SYNTAX**

```
PARTITION(source*,separation*)
```

**PARAMETER**

| **Name**   | **Type** | **Description**                          |
| ---------- | -------- | ---------------------------------------- |
| source     | string   | Source Field                             |
| separation | string   | String at which partition has to be made |

**EXAMPLES**

| **Source Data**        | **Expression**         | **Output**            |
| ---------------------- | ---------------------- | --------------------- |
| message= 'Hello world' | PARTITION(message,'l') | 'He', 'l', 'lo world' |

### **RAW\_VALUE**

**DESCRIPTION**

If consider\_source is set to True, returns value from source (if source exists and is not None) else returns value.

**SYNTAX**

```
RAW_VALUE(source*,value*,consider_source)
```

**PARAMETER**

| **Name**         | **Type** | **Description**                                        |
| ---------------- | -------- | ------------------------------------------------------ |
| source           | any      | Source field                                           |
| value            | any      | Value to be returned if source doesn’t exist           |
| consider\_source | boolean  | Whether to take source value into consideration or not |

**EXAMPLES**

| **Source Data**      | **Expression**                   | **Output**   |
| -------------------- | -------------------------------- | ------------ |
| product='INTEGRATOR' | RAW\_VALUE(product,'DCKAP')      | 'DCKAP'      |
| product='INTEGRATOR' | RAW\_VALUE(product,'DCKAP',True) | 'INTEGRATOR' |

### **REMOVE\_SPECIAL\_CHARACTERS**

**DESCRIPTION**

Removes special characters from the string. Selective special characters can be alone removed by using the parameter selections. Selective special characters can be alone retained by using the parameter exceptions.

**SYNTAX**

```
REMOVE_SPECIAL_CHARACTERS(source*,selections,exceptions)
```

**PARAMETER**

| **Name**   | **Type** | **Description**              |
| ---------- | -------- | ---------------------------- |
| source     | string   | Source field                 |
| selections | string   | Special characters to remove |
| exceptions | string   | Special characters to retain |

**EXAMPLES**

| **Source Data**               | **Expression**                                    | **Output**          |
| ----------------------------- | ------------------------------------------------- | ------------------- |
| email='<abc_d@dckap.com>###'  | REMOVE\_SPECIAL\_CHARACTERS(email)                | 'abcddckapcom'      |
| email='<abc_d@dckap.com>####' | REMOVE\_SPECIAL\_CHARACTERS(email,selections='#') | '<abc_d@dckap.com>' |
| email='<abc_d@dckap.com>####' | REMOVE\_SPECIAL\_CHARACTERS(email,exceptions='#') | 'abcddckapcom####'  |

### **REGEX**

**DESCRIPTION**

Supports findall, search, split, sub and match operations.

**SYNTAX**

```
REGEX(source*, pattern*, regex_function, sub_value, sub_count)
```

**PARAMETER**

| **Name**        | **Type**                                     | **Description**                                       |
| --------------- | -------------------------------------------- | ----------------------------------------------------- |
| source          | string                                       | Source field                                          |
| pattern         | string                                       | Pattern to search                                     |
| regex\_function | 'findall', 'search', 'split', 'sub', 'match' | Function to perform                                   |
| sub\_value      | string                                       | Value to be substituted for 'sub' function            |
| sub\_count      | integer                                      | Number of substitutions to be made for 'sub' function |

**EXAMPLES**

| **Source Data**                                                             | **Expression**                      | **Output**                                                   |
| --------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------------------------------ |
| message= 'Hello my Number is 123456789 and my friend's number is 987654321' | REGEX(message,'\d+')                | \["123456789","987654321"]                                   |
| message= 'Hello my Number is 123456789 and my friend's number is 987654321' | REGEX(message,'\d+','search')       | true                                                         |
| message= 'Hello my Number is 123456789 and my friend's number is 987654321' | REGEX(message,'\d+','split')        | \['Hello my Number is ', ' and my friend number is ', '']    |
| message= 'Hello my Number is 123456789 and my friend's number is 987654321' | REGEX(message,'\d+','sub','XXXX',1) | Hello my Number is XXXX and my friend's number is 987654321' |
| message= 'Hello World!'                                                     | REGEX(message,'\d+','match')        | false                                                        |

### **REPLACE**

**DESCRIPTION**

Returns a copy of the string where all occurrences of a substring are replaced with another substring

**SYNTAX**

```
REPLACE(source*,old*,new*,count)
```

**PARAMETERS**

| **Name** | **Type** | **Description**                 |
| -------- | -------- | ------------------------------- |
| source   | string   | Source field                    |
| old      | string   | String to change                |
| new      | string   | String to be replaced with      |
| count    | integer  | Number of replacements required |

**EXAMPLES**

| **Source Data** | **Expression**          | **Output** |
| --------------- | ----------------------- | ---------- |
| item="banana"   | REPLACE(item,"n","b",1) | "babana"   |

### **RJUST**

**DESCRIPTION**

Right aligns the string, using a specified character (space is default) as the fill character for making the length of the output string as the mentioned width.

**SYNTAX**

```
RJUST(source*,width*,fillchar)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                                                                 |
| -------- | -------- | ----------------------------------------------------------------------------------------------- |
| source   | string   | Source field                                                                                    |
| width    | integer  | Length of the output                                                                            |
| fillchar | string   | <p>String to make the text to the desired width and right justified</p><p>Default value:' '</p> |

**EXAMPLES**

| **Source Data** | **Expression**        | **Output**   |
| --------------- | --------------------- | ------------ |
| message='hello' | RJUST(message,10)     | ' hello'     |
| message='hello' | RJUST(message,10,'-') | '-----hello' |

### **ROUND**

**DESCRIPTION**

Rounds off the input number.

**SYNTAX**

```
ROUND(source*,digits)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                                          |
| -------- | -------- | ------------------------------------------------------------------------ |
| source   | float    | Source field                                                             |
| digits   | integer  | Number of values to be considered after decimal point while rounding off |

**EXAMPLES**

| **Source Data** | **Expression** | **Output** |
| --------------- | -------------- | ---------- |
| price=10.68     | ROUND(price,1) | 11.0       |

### **RSPLIT**

**DESCRIPTION**

Returns a list of strings by breaking the input string from the right side by the specified separator

**SYNTAX**

```
RSPLIT(source*,char,maxsplit)
```

**PARAMETER**

| **Name** | **Type** | **Description**                      |
| -------- | -------- | ------------------------------------ |
| source   | string   | Source field                         |
| char     | string   | String at which split has to be made |
| maxsplit | integer  | Maximum number of split points       |

**EXAMPLES**

| **Source Data**     | **Expression**               | **Output**           |
| ------------------- | ---------------------------- | -------------------- |
|                     | RSPLIT('Great Day',char='a') | \['Gre', 't D', 'y'] |
| message='Great Day' | RSPLIT(message,'a',1)        | \['Great D', 'y']    |

### **RSTRIP**

**DESCRIPTION**

Returns string with trailing suffix characters removed.

If no argument is passed, it removes trailing spaces.

Note: If source is not a string, returns source

**SYNTAX**

```
RSTRIP(source*,chars)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                       |
| -------- | -------- | ----------------------------------------------------- |
| source   | string   | Source field                                          |
| chars    | string   | <p>String to be stripped</p><p>Default Value: " "</p> |

**EXAMPLES**

| **Source Data**    | **Expression**   | **Output** |
| ------------------ | ---------------- | ---------- |
| city='Chennai '    | RSTRIP(city)     | 'Chennai'  |
| city='ChennaiXXXX' | RSTRIP(city,'X') | 'Chennai'  |

### **SEARCH**

**DESCRIPTION**

Gets the element at the specified index in list/string for valid index else returns default.

Note: Returns source if the source is of datatype other than list/string/tuple.

**SYNTAX**

```
SEARCH(source*,index*,default_value)
```

**PARAMETER**

| **Name**       | **Type**    | **Description**                  |
| -------------- | ----------- | -------------------------------- |
| source         | list/string | Source field                     |
| index          | integer     | Index value to be checked        |
| default\_value | string      | Default Value: "NOT\_IN\_SOURCE" |

**EXAMPLES**

| **Source Data**       | **Expression**                        | **Output**          |
| --------------------- | ------------------------------------- | ------------------- |
| item\_ids=\[10,20,30] | SEARCH(items\_ids,2)                  | 30                  |
| message='Hello'       | SEARCH(message,6,'No data available') | 'No data available' |

### **SLICE**

**DESCRIPTION**

Slices values from string/array

**SYNTAX**

```
SLICE(source*, step, start_index, stop_index)
```

**PARAMETER**

| **Name**     | **Type** | **Description**         |
| ------------ | -------- | ----------------------- |
| source       | string   | Source field            |
| step         | integer  | Step value              |
| start\_index | integer  | Starting index to slice |
| stop\_index  | integer  | Ending index to slice   |

**EXAMPLES**

| **Source Data**                 | **Expression**                | **Output** |
| ------------------------------- | ----------------------------- | ---------- |
| item\_ids=\[10, 20, 30, 40, 50] | SLICE(item\_ids, 2,1,5)       | \[20, 40]  |
| message= 'hello world'          | SLICE(message,start\_index=5) | ' world'   |

### **SPLIT**

**DESCRIPTION**

Returns a list of strings by breaking the input string from the left side by the specified separator

Note: If source is not a string, returns source.

**SYNTAX**

```
SPLIT(source*,char,maxsplit)
```

**PARAMETER**

| **Name** | **Type** | **Description**                      |
| -------- | -------- | ------------------------------------ |
| source   | string   | Source field                         |
| char     | string   | String at which split has to be made |
| maxsplit | integer  | Maximum number of split points       |

**EXAMPLES**

| **Source Data**     | **Expression**       | **Output**        |
| ------------------- | -------------------- | ----------------- |
|                     | SPLIT('Great Day')   | \["Great", "Day"] |
| message='Great Day' | SPLIT(message,'a',1) | \['Gre', 't Day'] |

### **STARTSWITH**

**DESCRIPTION**

Returns True if the string starts with the mentioned prefix in the specified index range else False.

Note: If source is not a string, returns source.

**SYNTAX**

```
STARTSWITH(source*,prefix,start,end)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                              |
| -------- | -------- | ------------------------------------------------------------ |
| source   | string   | Source field                                                 |
| prefix   | string   | Prefix string with which the check on source has to be made. |
| start    | integer  | Start index of the string                                    |
| end      | integer  | End index of the string                                      |

**EXAMPLES**

| **Source Data**     | **Expression**              | **Output** |
| ------------------- | --------------------------- | ---------- |
| message="Great Day" | STARTSWITH(message,"ay")    | false      |
| message="Great Day" | STARTSWITH(message,"r",1,5) | true       |

### **STRIP**

**DESCRIPTION**

Returns string with mentioned characters removed. If no argument is passed, it removes spaces.

Note: Returns source if source is not a string.

**SYNTAX**

```
STRIP(source*,chars)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                       |
| -------- | -------- | ----------------------------------------------------- |
| source   | string   | Source field                                          |
| chars    | string   | <p>String to be stripped</p><p>Default Value: " "</p> |

**EXAMPLES**

| **Source Data**     | **Expression**  | **Output** |
| ------------------- | --------------- | ---------- |
| city=' Chennai '    | STRIP(city)     | 'Chennai'  |
| city='XChennaiXXXX' | STRIP(city,'X') | 'Chennai'  |

### **TITLE**

**DESCRIPTION**

Returns title cased string (first character in upper case, rest in lower).

Note: Returns source if source is not a string.

**SYNTAX**

```
TITLE(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description**                            |
| -------- | -------- | ------------------------------------------ |
| source   | string   | Source field to be changed into title case |

**EXAMPLES**

| **Source Data**       | **Expression** | **Output**    |
| --------------------- | -------------- | ------------- |
| message='hello worlD' | TITLE(message) | 'Hello World' |

### **TO\_ARRAY**

**DESCRIPTION**

Returns an array containing the input strings

**SYNTAX**

```
TO_ARRAY(*args)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                               |
| -------- | -------- | ------------------------------------------------------------- |
| args     | string   | <p>source fields (n>=1)</p><p>Data to be pushed into list</p> |

**EXAMPLES**

| **Source Data**                                  | **Expression**                    | **Output**      |
| ------------------------------------------------ | --------------------------------- | --------------- |
| <p>first\_name='Iron'</p><p>last\_name='man'</p> | TO\_ARRAY(first\_name,last\_name) | \['Iron','man'] |

### **TO\_ASCII**

**DESCRIPTION**

Converts Unicode characters to ASCII.

Note: Returns source, if source is not a string.

**SYNTAX**

```
TO_ASCII(source)
```

**PARAMETER**

| **Name** | **Type** | **Description**        |
| -------- | -------- | ---------------------- |
| source   | string   | Source field to remove |

**EXAMPLES**

| **Source Data**    | **Expression**        | **Output** |
| ------------------ | --------------------- | ---------- |
| item\_name='Škoda' | TO\_ASCII(item\_name) | 'Skoda'    |

### **TO\_NUMBER**

**DESCRIPTION**

Retrieves number in a string. Puts all the numbers in source as a list which can be indexed and accessed. Returns the value at zeroth index by default.

Note: Returns " " if source is not a string.

**SYNTAX**

```
TO_NUMBER(source*,index)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                        |
| -------- | -------- | ------------------------------------------------------ |
| source   | string   | Source field                                           |
| index    | integer  | <p>Index of the number need</p><p>Default Value: 0</p> |

**EXAMPLES**

| **Source Data**                                   | **Expression**      | **Output** |
| ------------------------------------------------- | ------------------- | ---------- |
| line1='14/3, 3055 GRAND AVE 75215, DALLAS, Texas' | TO\_NUMBER(line1)   | "14/3"     |
| line1='14/3, 3055 GRAND AVE 75215, DALLAS, Texas' | TO\_NUMBER(line1,1) | "3055"     |

### **TO\_STRING**

**DESCRIPTION**

Converts an array to string.

**SYNTAX**

```
TO_STRING(source*,join_characters)
```

**PARAMETER**

| **Name**         | **Type** | **Description**                                                                    |
| ---------------- | -------- | ---------------------------------------------------------------------------------- |
| source           | list     | Source field                                                                       |
| join\_characters | string   | <p>Join string to connect the elements in source array</p><p>Default Value=','</p> |

**EXAMPLES**

| **Source Data**                   | **Expression**             | **Output**      |
| --------------------------------- | -------------------------- | --------------- |
| alphabets=\["h","e","l","l","o" ] | TO\_STRING(alphabets)      | "h,e,l,l,o"     |
| alphabets=\["h","e","l","l","o" ] | TO\_STRING(alphabets,'\*') | "h\*e\*l\*l\*o" |

### **TO\_TIMESTAMP**

**DESCRIPTION**

Converts the given datetime to timestamp.

**SYNTAX**

```
TO_TIMESTAMP(source*, date_format, from_time_zone)
```

**PARAMETER**

| **Name**     | **Type**               | **Description**                                                                                                                                                                                        |
| ------------ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| source       | Datetime object/String | Source field                                                                                                                                                                                           |
| date\_format | String                 | <p>Format of the date if source is a string</p><p>Ex: "%Y-%m-%d %H:%M:%S"</p>                                                                                                                          |
| time\_zone   | String                 | <p>Timezone <a href="https://docs.dckapintegrator.com/developers/flows/supported-timezones"><https://docs.dckapintegrator.com/developers/flows/supported-timezones></a></p><p>Default Value: "UTC"</p> |

**EXAMPLE**

| **Source Data**                      | **Expression**                                    | **Output**   |
| ------------------------------------ | ------------------------------------------------- | ------------ |
| created\_at='2021-05-27 01:30:00 PM' | TO\_TIMESTAMP(created\_at,'%Y-%m-%d %H:%M:%S %p') | 1622079000.0 |

### **TRUNCATE**

**DESCRIPTION**

Truncates count characters . If reverse is set to True, the characters from right are truncated.

**SYNTAX**

```
TRUNCATE(source*,count,reverse)
```

**PARAMETER**

| **Name** | **Type** | **Description**                                                                |
| -------- | -------- | ------------------------------------------------------------------------------ |
| source   | string   | Source Field                                                                   |
| count    | integer  | Number of characters to be truncated from right                                |
| reverse  | boolean  | <p>Set to True to truncate characters from left</p><p>Default Value: False</p> |

**EXAMPLES**

| **Source Data** | **Expression**           | **Output** |
| --------------- | ------------------------ | ---------- |
| message='test'  | TRUNCATE(message,2)      | 'st'       |
| message='test'  | TRUNCATE(message,2,True) | 'te'       |

### **UPPER**

**DESCRIPTION**

Converts all lowercase characters in the string to uppercase.

Note: Returns source if source is not a string.

**SYNTAX**

```
UPPER(source*)
```

**PARAMETER**

| **Name** | **Type** | **Description** |
| -------- | -------- | --------------- |
| source   | string   | Source field    |

**EXAMPLE**

| **Source Data**     | **Expression** | **Output**  |
| ------------------- | -------------- | ----------- |
| message='Great Day' | UPPER(message) | 'GREAT DAY' |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dckapintegrator.com/project-manager/integrations/advanced-modifiers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
