Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Field names lost when "Dynamic input" is used within a custom macro.

jensroy
9 - Comet

Hello Community!

 

So I am having a challenge with field names. Inside a custom macro, I have dynamic input. This dynamic input holds a "dummy" excel file. This file path is then updated based on user input.

 

But what happens when I run the workflow? Well, If i do no changes to my workflow, then tools display the correct fields anywhere in the stream.

But If i make a changes to the workflow, the "metadata" coming from the macro is "resett" to the vales of the dummy excel file.

 

The video below shows what happens.

 

Basically, after the first run, I have 2 fields, "Sold to Country" and "Sold to Continent". This shows in the output of the macro as well as in the select tool.

Then I delete the select tool and insert a new select tool. Now, the select tool finds 2 other fields "F1" and "F2". These are the two fields inside the dynamic input tool, inside the macro, as a dummy file that is replaced by user input.

 

Any way I can overwrite the raw xml or something like that to force through the correct field names?

 

 

 

11 REPLIES 11
mceleavey
17 - Castor
17 - Castor

Hi @jensroy ,

 

is it possible to share the macro so I can run it and have a look?

 

M.



Bulien

jensroy
9 - Comet

Sure, I have added a simplifyed version of the macro to the workflow.

If you add one select tool, it works fine, but if you add a second select tool, the meta data becomes the metadata of the dummy file.

 

In the attached workflow, there are 2 files you can choose from in the dropdown. CC.xlsx and C_Dummy.xlsx.

The dummy file is the CC.xlsx

mceleavey
17 - Castor
17 - Castor

Hi @jensroy , there doesn't appear to be anything attached.

 

M.



Bulien

jensroy
9 - Comet

It was hidden below the video. I'll attach it here as well. Thanks for looking at it!

mceleavey
17 - Castor
17 - Castor

Hmmm,

 

I can't replicate this. When I run it I get the first row as the title, the same as yours. When I delete the select tool and replace it, I get exactly the same.

What version of Alteryx are you using? I'm on this:

 

clipboard_image_0.png



Bulien

jensroy
9 - Comet

 What do you get if you add 2 select tools in the flow at the same time?

On the server I am at the same version as you, but the workflow I sent you was created on a 2018.04 version. I get the issue on both installs. We are waiting for IT to rollout Alteryx 2019.02 in a few weeks here.

mceleavey
17 - Castor
17 - Castor

I get the same.

 

Interesting. I can't help, I'm afraid..



Bulien

jensroy
9 - Comet

Thanks for trying though 🙂

 

I have a huch that that raw xml is "refreshed" by some actions, and once that happens, it starts reading from the "last known source". Since the input is dynamic, it grabs data from the dummy file, as dynamic data can change on every run.

 

But I think it should "remember" the metadata from previous run though. I will probably raise this with Alteryx support.

rafalolbert
ACE Emeritus
ACE Emeritus

Hi @jensroy,

 

Have you considered any of the below:

 

1) in the select tool, after you run your data (provided this is expected to be the same later) - go into Options -> Save/Load -> Save Field Configuration (when you drop a new select, load metadata including field names and types from the file created in previous step)

 

2) use Ensure Fields from CReW Macro pack: http://www.chaosreignswithin.com/p/macros.html (all credit goes to the amazing team behind this!) - this tool allows you to force a list of field names (along with uniform type, which you may need to alter with a Select tool to follow and address different types for different fields/ alternatively add multiple Ensure Fields)

 

Hope one of these methods may help with your problem?

 

Thanks,

Rafal

 

#Excuse me, do you speak Alteryx?

Labels