Alteryx Designer Desktop Discussions

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

Iterative macro error with mapping fields

Arch
8 - Asteroid

Here is my situation. I have an iterative macro that I have been using for testing purposes and found that the value of one of my fields is negative one (-1), when it should never be -1. After much digging I find that this one field (Downtime_C) is not included in the Macro Input text input list. At this point it didn't occur to me how the macro was working without this field. So I diligently added it to the list, because it is one of the incoming fields to the macro. Save, Run. Get an error message that all fields must be mapped for the input. More comparing and digging. No idea why the macro works when the field is not included in the Macro Input and why it does work when it is not included. It is totally counter intuitive.

 

Any help would be greatly appreciated before I end up with less hair than I already have.

 

Workflow and macro attached.

 

Thanks.

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@Arch I just have a couple observations:

1) Maybe I'm missing something, but it looks like you would want to uncheck the "show field map" option on your macro input inside your macro. This option is useful when you have dynamic field names (like your macro input has field1 and field2, you could "map" fieldA and FieldB to these field names so your macro would work). Since you have the same field names in your workflow as your macro, this option is just added noise.

2) For multi-field formula 379, you should change your expression to just: 0. the formula [_CurrentField_]==0 is checking if the fields are ==0, which will return -1 if true and 0 if false.

Arch
8 - Asteroid

Patrick, thanks for the explanation in item 1; you're certainly not missing as much as I am. And thanks for catching the logic error in the Multi-Field Tool. My results now make much more sense.

 

Much appreciated.

Labels