Start Free Trial

Alteryx Designer Desktop Discussions

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

HTML </br> tag causing address issues

taylorobbins12
6 - Meteoroid

Hello, I have a doc of html code.  I broke it out by location, address.  Some of the files have an address2 line which are causing this issue, others dont and they are shown as below.

 

Student Center                            <br/>Albany, GA 31705

 

Is there a way in alteryx to split this into 2 seperate rows?  maybe with a formula?

 

What I want ex....

 

Student Center     

Albany, GA 31705         

 

thinking something like this............ if </br> then newRow         

 

Please let me know  

11 REPLIES 11
ponraj
13 - Pulsar
 
LordNeilLord
15 - Aurora
Hey @taylorobbins12

Using the regex tool in tokenize mode place <\/br> as the criteria and select split to rows

This will split on line breaks

Neil
taylorobbins12
6 - Meteoroid

Thank you for your quick response! That worked, but not all elements of my HTML have that issue.  I have attached an example of my data with some having address only and other having address and address 2.  In my final output, I am looking to have a table with Location, Address, Address2, City, State, Zipcode, Phone Number.  Please let me know if you can help.

LordNeilLord
15 - Aurora

Hey @taylorobbins12

 

Thanks for the example but this isn't the full HTML....do you have an example of the original HTML that I could use?

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

taylorobbins12
6 - Meteoroid

@LordNeilLord Yes this is all I have.  It would be much easier if there were more tags and i could create a lookup table.  I have pasted my dataset and solution I have come up with so far, but as you can see when there is an address 2, the city,state, zipcode goes on the same line with it.  I am wanting 7 columns location, address, address2(if exisits, else null), city, state, zipcode, phone.  I think the regex tool would be most beneficial for this example but I am new to this tool and learning(as you can tell from all the browse options to see my data).  Please let me know if you come up with something!

LordNeilLord
15 - Aurora

This one has got me properly stumped!

 

The html is so badly formed that if I implement something to correct a problem it causes a problem elsewhere. I can't seem to get round it without writing conditions for every single line.

 

I wonder if @MarqueeCrew can solve this

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

MarqueeCrew
20 - Arcturus
20 - Arcturus

Because @LordNeilLord asked I've added a quick parse of the html.  I don't quite get the data question, but here's my take on how to read it.

 

I used my eyes and did replacements.  I saw text followed by spaces and decided to place pipes as replacements.  Then I repeated this until I created something workable.  This might not be the "answer", but it should help.

 

capture.png

 

Cheers,

Mark

 

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
LordNeilLord
15 - Aurora

Thanks for giving it a go @MarqueeCrew

 

You got closer than I did

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

taylorobbins12
6 - Meteoroid

Thanks for your assistance! That is so very close, except when i add a text to columns with a "|" delimiter, the data doesn't go into a table with the appropriate rows.  Is there a way to concatenate row "Address" and "Address2" into 1 row so they are both in a column "Address" and goes into a DB table correctly?

 

Also, working to update the "Replace([Concat_Field_1], '""/', '|')" field to keep the location tag because this is filtering it out as well

Labels
Top Solution Authors