Alteryx Designer Desktop Discussions

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

Extract value in row + 1 and then replace null in preeceding column

hellyars
13 - Pulsar

Question.

Reference START POINT and DESIRED OUTCOME below.

 

I used a Regex Tool to extract CAGE and the corresponding 5 digit code.

If Reg2 is not null I want to extract the Company Name from Row +1 and enter it into Reg 2; add Company to Reg 1.

 

 

 

 

 

 

 

START POINT...

DownloadDataReg1Reg2
yada yada yadanullnull
<td class="KeyCellCtLnk" title="TACO BELL" onclick="fnShowLookup('CAGE', this.innerHTML);" ontouchstart="ehST(this,event);" ontouchend="ehET(this);">45152</td>CAGE45152
<td class="KeyCellLt DesktopOnly">TACO BELL</td>NullNull
blah blah blahNullNull
blah blah blahNullNull

 

DESIRED OUTPUT....

 

DownloadDataReg1Reg2
yada yada yadaNullNull
<td class="KeyCellCtLnk" title="TACO BELL" onclick="fnShowLookup('CAGE', this.innerHTML);" ontouchstart="ehST(this,event);" ontouchend="ehET(this);">45152</td>CAGE45152
<td class="KeyCellLt DesktopOnly">TACO BELL</td>CompanyTACO BELL
blah blah blahNullNull

 

 

3 REPLIES 3
Kamran1991
11 - Bolide

It seems a little confusing. Please elaborate it in a better way and try to share a dummy data in excel.

mceleavey
17 - Castor
17 - Castor

Hi @hellyars ,

 

You can probably build these into the same Regex tool, but I think the first alters the structure of the second, so I built it in two for ease.

 

mceleavey_0-1644312091901.png

Reg2 - >(.*?)<

Reg1 - ['](.*?)[']

 

if isnull([Reg1]) and !isnull([Reg2]) then "Company" else [Reg1] endif

 

I hope this helps,

 

M

 

 



Bulien

hellyars
13 - Pulsar

Why? That is the real data. 

Labels