Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Problem with formula

Wojtek_Dz
8 - Asteroid

Hello, I'm looking for solution to extract specific part of data

 

The data in my column looks like this (below)

 

20xx-10-31SPR10F/000000/3Spr.00000/10/00/01/FF
20xx-11-07S10/000001/3sometext

etc.

 

And I want to take out this "00000/10/00/01/FF" part form the first line if there is "Spr." word and if not the formula should take this part "S10/000001/3sometext"

 

I wrote something like this " if FindString([data_column], 'Spr.') then Right([data_column], 17) else Substring([data_column], 10) endif "  but I only receive the 17 digits from right

 

Could you tell me what I'm doing wrong ?

 

Thanks !

 

4 REPLIES 4
Qiu
20 - Arcturus
20 - Arcturus

@Wojtek_Dz 
You mean take out, right? so you need to add Replace formula I think.1018-Wojtek_Dz.PNG

Wojtek_Dz
8 - Asteroid

Hey Qiu thanks for your answer. 

 

But unfortunately your solution is not what I was looking for


For column with this dataset:

20xx-10-31SPR10F/000000/3Spr.00000/10/00/01/FF
20xx-11-07S10/000001/3sometext

I want to take out this parts to new column:

00000/10/00/01/FF
S10/000001/3sometext

 

Thanks !

 

Qiu
20 - Arcturus
20 - Arcturus

@Wojtek_Dz 
I come to know the problem here.

The FindString function is returing the numeric position of the target string, while not a true or false.

So you condistion statement always goes to true branch.

Now modified the worksflow as attached.

Appreicate if you could mark it as accepted.1017-Kıvanç1.PNGFinString.PNG

Wojtek_Dz
8 - Asteroid

Thanks, now it works.

 

Greetings 🙌

Labels