--- title: "RIGHTOF" slug: "rightof" updated: 2023-06-15T15:31:31Z published: 2023-06-15T15:31:31Z canonical: "docs.datajet.app/rightof" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # RIGHTOF ## String: RIGHTOF ## Extracts all characters to the right of the first occurrence of defined character. ## Purpose Use this function to: - Extract a sub-string from another string - Find text to the right of a specified string ## Return Value | Property | Value | | --- | --- | | **FieldType** | String | | **FieldSize** | Low / Med / High / Continuous | | **DataType** | Discrete / Continuous | | **DataSize** | Short / Integer / LongInteger / Double | ```shell MyStringValue ``` ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1686842775259.png) ## Parameters | Parameter | JSON | Description | | --- | --- | --- | | **Table** | “targetTable”: “MyTableName” | The target table on which the new field will be created | | **Overwrite** | "overwrite": true | true/false. If true will automatically overwrite an existing field. | | **Filter** | “dataset”: {DataSet_JSON} | Optional. If a filter is applied, records not in the filter recordset will be returned as null. | | **Function** | "function":"string" | String | | | “p1”: “RIGHTOF(A,B)” | RIGHTOF(A,B) | | | “p2”: "ShortFieldName" | Required. Field to modify. *Supports:* - **DataType:** Discrete or STRING CONT - **Field Type:** Discrete (All), Continous (String) - **Fixed Value:** #fixedvalue | | | “p3”: "SubString" | Required. Character from which to begin new string *Supports:* - **DataType:** DISCRETE - **Field Type: String** - **Fixed Value:** #A, #Aaaa, #An nNa | | **Treat Null as Zero** | "nullIsZero": true "nullIsZero": false | True/False. Default = False If true, then any null values in the input fields will be treated as if they have a value of 0. | ## JSON Sample ```json { "method": "BuildBakedField", "project": "BikeData2", "targetTable": "Journeys", "overwrite": true, "name": "Town", "function": "string", "p1": "RIGHTOF(A,B)", "p2": "StartStation Name", "p3": "#," } ``` ## Usage Notes See Also: - Engineering | Expression Field - LeftOf - Right - Left ## Example | Example | Details | | --- | --- | | **Description** | Extract Town From Station Name | | **Input** | - Table: = [Journeys] - Filter: = [No Filter] - **Function: = String** - String Function:= RIGHTOF(A,B) - A:=[StartStation Name] - B:=#, - Name: = Town | | **Sample** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1686750136992.png) |