Alteryx Designer Desktop Discussions

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

Remove Null Values from Output, but keep all other values from Record/Row

HenpetsGordres1
8 - Asteroid

RE: Find End Date and set for all related records 

 

Following on from my previous 2 questions, I wanted to check if the following is possible. I have created an output similar to the below image:

 

StephenRodgers_0-1579012778472.png

 

My final output will be in XML format, is it possible to drop the 'Non UK' column for the first 2 records? So in theory the 2nd and 3rd records would appear something like the below image (i.e. Row 12: NonUK is only present when not null):

 

StephenRodgers_1-1579013230576.png

 

I have been able to program the XML output but can't remove 'NonUK' from Row 2. Is it possible to remove this before output so my file does not appear like the below:

 

StephenRodgers_3-1579013456581.png

 

Many thanks

 

 

 

 

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

Hello @HenpetsGordres1 ,

 

You can definitely do that.

 

Open your report on the alteryx designer as a csv with the delimieter \0

 

After that you could just insert a filter tool with the 'Does not equal' and <NonUK>.

 

This would delete the empty <NonUK> from your file

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

OllieClarke
15 - Aurora
15 - Aurora

Depending on how you're creating your xml in the workflow @HenpetsGordres1 you could use the following formula immediately before the output tool

REPLACE([XML],'<NonUK>[Null]</NonUK>','')

OllieClarke_0-1579018360375.png

edit: added screenshot

HenpetsGordres1
8 - Asteroid

Thank you both for your proposed solutions. I chose to use Ollie's as the 'NonUK' field was created within the workflow so the REPLACE Formula was an easier approach, while I'm sure both are great solutions. Many thanks to all involved.

Labels