How to remove a certain part of a string?


I need some help on how to remove everything from a string if a substring finds a "," for example

Test 11/2019, nº 3 I want this result, Test 11/2019 In this case everything after the "," and the "," must be removed. How can I get this result? I tryied substring but it only removes the ","

Hi Daniel,

You can use the Index function to know where the "," is.

Hope this help



Something is not right here, the behavior that you describing is the Replace function and not the Substr

Anyways, to achieve that behavior, you can use 

Substr(String,0,Index(String,",") + 1)

if you always have a "," in your String.

Otherwise, it is better to use String_Split (dependency that you can add from the module Text), just because this always returns 1 value and you don't have to check if your string has a "," or not