Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Removing Characters from header fields

parria1
8 - Asteroid

I have a data set that includes headers formatted like this

WE
10/
24/
2020
WE
10/
17/
2020
WE
10/
10/
2020
WE
10/
03/
2020
Sep
2020
Aug
2020
Jul
2020
Jun
2020
May
2020

 

I have two issues keeping me from outputting this to a table in an Access Database:

1. Carriage return. I have this fixed with a regex formula in a multi field formula tool

2. the / character in the date fields. how do i replace this with a dash? i tired find and replace but the tool would not display the fields above that had the / symbol.

6 REPLIES 6
AngelosPachis
16 - Nebula

Hi @parria1 ,

 

If the "/" character is in your headers, you can use a dynamic rename tool, connect your stream to the L input anchor and use the following formula 

 

Screenshot 2020-10-30 173642.jpg

 

Hope that helps.

 

Regards,

 

Angelos

parria1
8 - Asteroid

That works for the / fields.

 

my regex in the multiformula field toold for the carriage return actually is not working on the numeric fields. here is what i have

 

Regex_Replace( [_CurrentField_], "\r*\n*", "")

 

i receive the error below

 

Error: Multi-Field Formula (13): Parse Error at char(1): Formula: tried to apply string operator to numeric value (REGEX_REPLACE)

AngelosPachis
16 - Nebula

Hey @parria1 , apparently the field you are applying your regex is a numeric data field and regex can only be applied into string fields. Can you make sure the field you are applying regex to in your multi-field formula tool is a string field please?

parria1
8 - Asteroid

it needs to be a numeric field. 

 

i guess i can change it to text, do the regex, then change it back to numeric.

AngelosPachis
16 - Nebula

Correct @parria1 , hope that works!

parria1
8 - Asteroid

it's not practical in the long run as new fields will pop up that have this issue.

 

 

Labels