convertnumbers

Convert the numerical characters in a string into a number.

This guide explains how to configure the convertnumbers instruction. To learn about another instruction, go back to the Available custom script instructions overview.

Introduction

Use the convertnumbers instruction to convert data containing numeric characters into number format.

You may need to use this instruction before other instructions that require numeric data, such as sumup.

Creating a custom script enrichment using the convertnumbers instruction

To create and configure a custom script using the convertnumbers instruction, follow these steps:

  1. Create a custom script enrichment.

  2. In the Instructions step, select the convertnumbers instruction.

  3. To configure the custom script instruction, fill in the required fields below, as well as any optional fields you require:

Fields (required)

Enter the column containing the values to convert.

Locale (required)

Enter the locale of the numbers to convert as a two-letter ISO 639 language code. These codes are always in lower case, e.g. en for English or de for German. For a full list of codes, see ISO 639 language codes.

The converted numbers are always output in en format, i.e. 100000 instead of 100.000.

This field is case sensitive.

Default

Enter the value to use if the conversion cannot be applied (for example, if the value to convert is not numeric characters). Enter either a number or select null.

Strict

If selected, the value None is returned if the conversion fails.

Example

Enrichment configuration

Fields

Clicks

Locale

de

Default

0

Data table before enrichment

Campaign

Clicks

Brand

175.856

Outreach

238.753

Organic growth

99.651

Retention

No data

Data table after enrichment

Campaign

Clicks

Brand

175856

Outreach

238753

Organic growth

99651

Retention

0