Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Formula to include Wildcard

pohrt
8 - Asteroid

Hello all, 

 

probably beginners question:

I need to dynamically Filter for File names in a Directory. Everything works except I have to separate the Files that I want:

Example of the file name patterns

SUMMER-NEW1-xxxx_yyyyyy

SUMMER-NEW2-yyyyy_zzzzz

SUMMER-NEW3-zzzzzzzzz_uuuuu

SUMMER-NEW2_testing

SUMMER-NEW3_xxxxxxx

 

I want to use all Files (true) that have something like 

*begin with SUMMER-NEW then have "?" (one character) then have "_" (underscore)

 

The issue is

* that those files have an "underscore" in their names further on

* I need a Wildcard for 1 character then followed by an underscore for those files that I don't want (false).

 

Hope that makes sense?

Thanks already,

Petra

 

 

 

 

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@pohrt ,


If there is only a 1 digit #, a startswith() function and substring () will work fine.  

!regex_match([field],"SUMMER-NEW\d+_.*")

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
pohrt
8 - Asteroid

Thanks Mark,

 

I still had a few incorrectly included files and reversed your formula:

regex_match([field],"SUMMER-NEW\d+-.*")

 

... and this worked fine.

 

THANK YOU

Petra

 

Kim
5 - Atom

Hi Mark

 

I am a new user.

 

I understand '*' can be used as a wildcard in MS Excel but not sure how i can apply this when creating a workflow.

 

I would like the 'Invoice ID' field to pick up the data in the Description field if JE Number field contains prefix 'MJ....' otherwise use the data in the Invoice ID field. I'll apply 'MJ*' in an XL function but not sure how in Alteryx.

 

I tried the formula below but it won't work.

 

IF [JE Number] = "MJ*" THEN [DESCRIPTION] ELSE [INVOICE ID] ENDIF

 

Can you shed light? Thanks.

flying008
15 - Aurora

Hi, @Kim 

 

 

 IIF(StartsWith([JE Number],'MJ'), [DESCRIPTION], [INVOICE ID])

 

Labels