Alteryx Designer Desktop Discussions

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

Finding Patterns and Creating column

sriniprad08
11 - Bolide

Hi Team,

Hope you are well.

i need help. Please find below and let me know how to go about this.

 

Thanks

sriniprad08_0-1679666267803.png

 

15 REPLIES 15
FrederikE
13 - Pulsar

Hey @sriniprad08,

 

You could do something like this:

FrederikE_0-1679666667908.png

 

But the "start with" part is missing - what do you mean there?

 

FinnCharlton
13 - Pulsar

Hi @sriniprad08, something like this might help? Not sure if there is any more logic around the 'CXL' part, let me know if it works for you and we can try some other things if not.

FinnCharlton_0-1679666893683.png

 

binuacs
20 - Arcturus

@sriniprad08 one way using contains formula

 

IIF(Contains([input],’-S’,’Sales Contract’,IIF(Contains([input],’-P’,’Purchase Contract’,’cxl’))

sriniprad08
11 - Bolide

Hi @binuacs ,

 

thanks for the reply and help. am i missing anything in this error

sriniprad08_0-1679668507739.png

 

FinnCharlton
13 - Pulsar

@sriniprad08 need a ')' after ([Input],'-S'

sriniprad08
11 - Bolide

Hi @FinnCharlton ,

 

Thank you for the help. Looks great. One question please

there are situation where CXL12334 or CXL-12345 or CXL 12345.

How can i handle these scenarios please?

 

Cheers,

Sri

FinnCharlton
13 - Pulsar

@sriniprad08 Do you want these variants to return 'CXL' as well, or something else? I think everyone here's code will return 'CXL' for all those values.

sriniprad08
11 - Bolide

Hi @FrederikE ,

 

thanks. looks great. the start part is if starts with CXL then its CXL.

 

Cheers,

Sri

sriniprad08
11 - Bolide

Hi @FinnCharlton 

Thank you for all the help. Please find attached the excel file the input and output. Sorry if there is a miscommunication,

 

Thanks for the support

sriniprad08_0-1679669988228.png

 

Labels