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

If a column is not present in the input file, default the value to constant

RAMN
8 - Asteroid

Hi,

I am using a drop down tool for field tagging of input file in the app interface, I need to populate a constant value if the column is not present in the input file. For example, I have column A in the input file with values 20,30,40..after tagging the filed I will get those values in the output. Next time when I run with new file that doesn't have column A in it, then I need to have A in the output that is populated with constant(ex: 10 for all the records).

 

Regards,

Ramn

6 REPLIES 6
MichalM
Alteryx
Alteryx

@RAMN 

 

Do you want to detect the missing column automatically or could it also work with an interaction through the app interface which you seem to be using already anyway? ie check this box if the Column A is missing.

RAMN
8 - Asteroid
Hi MichalM,

I am looking for option using interface, if the column is not present then populate some value for that field.

Regards,
Ram
MichalM
Alteryx
Alteryx

Would something like this work?

 

  • User selects a file to use
  • Alteryx lists the available columns
  • User checks the available columns
  • User selects the checkbox if Column A is missing
  • User will be presented with an option to define the constant value
  • The value will be used to populate Column A
  • If the Column A is available and user doesn't check the box, Alteryx will leave the value untouched

 

I use Detour to create two streams within the workflow - if user checks the box, detour goes to the right. Otherwise it goes to the left.

 

detour.png

 

 

RAMN
8 - Asteroid

Hi MichalM,

 

Thanks for the reply. That worked...!!!

 

Regards,

Ram 

MichalM
Alteryx
Alteryx
Brilliant! I'm glad to hear. Could you please mark it as a solution when you get a min so others can easily find it? Thanks.
gaurav777_arya
5 - Atom

Hi,

 

What if I need to detect the column automatically? I basicay have an input file which bas a field 'Dispute Amount'. Sometimes it will be present in the input file and sometimes it won't be present. When it's present, Alteryx can pick up the value of the field, when it's not present, how xan Alteryx automatically detect that the column is not present and a default value us assigned to it?

Labels