Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
GELÖST

Finding Patterns and Creating column

sriniprad08
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 ANTWORTEN 15
FrederikE
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
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
Arcturus

@sriniprad08 one way using contains formula

 

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

sriniprad08
Bolide

Hi @binuacs ,

 

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

sriniprad08_0-1679668507739.png

 

FinnCharlton
Pulsar

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

sriniprad08
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
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
Bolide

Hi @FrederikE ,

 

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

 

Cheers,

Sri

sriniprad08
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

 

Beschriftungen