cancel
Showing results for 
Search instead for 
Did you mean: 

Sub String and Find String together

SOLVED
Rajesh
Meteoroid

Sub String and Find String together

Hi there,

 

I am trying to extract specific value from the cell.

 

From the cell Col AL4       | | 0996792463_0037932 | S61584 | 101 | 440061339 |

 

Using the formula in excel =TRIM(MID(AL4,5,SEARCH("|",AL4,4)-5))

 

it gives me the correct value = 0996792463_0037932

 

However when I am trying Alteryx 

 

Substring([AL],5,FindString([AL],"|",4)-5 

it is not working.

 

Need help

 

 

2 REPLIES 2
Rajesh
Meteoroid

Sub String and Find String together

Hi there,

 

I am trying to extract specific value from the cell.

 

From the cell Col AL4       | | 0996792463_0037932 | S61584 | 101 | 440061339 |

 

Using the formula in excel =TRIM(MID(AL4,5,SEARCH("|",AL4,4)-5))

 

it gives me the correct value = 0996792463_0037932

 

However when I am trying Alteryx 

 

Substring([AL],5,FindString([AL],"|",4)-5 

it is not working.

 

Need help

 

 

binu_acs
Polaris

Re: Sub String and Find String together

@Rajesh The FindString() function will always check the first occurrence of the character in the given string, in this case, this function will return the first occurrence of the char "|", that's why you are not getting the correct result, one way of achieving your expected output you need to trim the characters || from the string then try with the formula

binuacs_0-1685481655032.png

 

Attachment
Download this attachment

Re: Sub String and Find String together

@binu_acs  Thank you so much this really works.