Back to list

How can using the formula type "TRUNCATE" to shorten a field?

To truncate a specific field, use a custom field and the "TRUNCATE" formula.

When setting up the import, you need to go to the "Additional Settings" tab in the second step and create a custom field.



To create a Custom Field, you need to select the field that you want to truncate. In our case, it will be description.

We set the condition to "Any".
Write down the name of the custom field "description_truncate".
For the formula type, select "Truncate".

And then in the formula, we specify the process of field truncation.

From the list below, select the name of the field you want to truncate.
Next, write the formula, using "TRUNCATE_TO_" next to the limit value, you need to specify a number that indicates the number of characters that the selected field will contain.
For example, TRUNCATE_TO_7 means that our mole will contain only 7characters.



Do not forget to save the created custom field!




Next, go to the "Information" tab in the second step of the import.
And in the description field, instead of the usual description field that is in the file to be exported, select the newly created custom field "description_truncate".






 The result of the truncation is shown below:

The "TRUNCATE_TO_" formula adds three dots "..." to the end of the field. And note that these three dots are included in the total number of values when truncating a field.

Also, it is possible to use the "SUFFIX_TO_" formula type, you can replace a symbol or value at the end.
For example, replace 3 dots "..." with 3 exclamation points "!!!".
In the formula, it will look like this:


After the import the field will look like this:



You can also use the "SUFFIX_TO_" formula to simply remove the ellipsis at the end without writing anything after it:


But note that instead of three dots, if you don't add anything to the "SUFFIX_TO_" formula, three characters from the file to be imported will be added.
And the result will be:


So, the settings to truncate the field are ready for import!

Usefulness of the answer:
0/0
Having trouble with import?
Don't worry, we offer import assistance for you!
SURE, HELP ME!