ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Formula to include Wildcard

pohrt
アステロイド

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件の返信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
アステロイド

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
アトム

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
オーロラ

Hi, @Kim 

 

 

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

 

ラベル
トップのソリューション投稿者