Alteryx Designer Desktop Discussions

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

Select fields with a list box within a macro

Xeu911
8 - Asteroid

Hi everyone,

 

I'm currently builing a macro that allows me to apply a multi row formula on multiple fields (see screenshot below). 

Xeu911_0-1682060720476.png

It is kind of working however I have an issue when using the macro, fields that are not selected are dropped.

Xeu911_1-1682060872453.png

Xeu911_0-1682061243452.png

 

And I would like them to be kept without any transformation (orignial format). So in my exemple, I'd like the field z2 to be in the output of the macro without any transformation.

Additional question: how can I easily configure the workflow to apply this multi row formula on both strings and doubles? Because currently the cross tab tool forces me to choose one or the other.

I've attached the macro and the workflow for test. I hope my request is clear enough and that someone can give me a hand on this!

 

Thanks in advance!

5 REPLIES 5
PhilipMannering
16 - Nebula
16 - Nebula

Hello @Xeu911 

 

Nice easy challenge to finish of the week... 👀

think I've found a solution...see attached.

 

I've added comments to where I've make changes to your macro,

PhilipMannering_0-1682065720037.png

 

Please test, and let me know if it works!

 

Xeu911
8 - Asteroid

Hi @PhilipMannering 

Thanks for your reply! Which version of designer are you using? Currently I'm working with the 2020.4 version and it's managed by my company so I cannot install a higher version.

Could you please maybe share the file as .yxmc format? It may solve the version compatibility issue...

Cheers!

PhilipMannering
16 - Nebula
16 - Nebula

Hi @Xeu911. Ah yes, I'm using the latest version. I'm guessing you're seeing that dreaded black box with a question mark? You could open up the macro separately and save down to change the version of the macro first. But here's the macro attached.

Xeu911
8 - Asteroid

Hi @PhilipMannering . What I was seeing is this error message :

Xeu911_0-1682067778870.png
But now it's all good and it works perfectly! 

Thanks very much for your help, really appreciated!

 

PhilipMannering
16 - Nebula
16 - Nebula

Yeah, you can ignore that warning 99% of the time. Unless I actually did use functionality that isn't available in 2020.4... but pretty sure I didn't.

 

You're welcome. I think the trick here is to find a way to select the inverse of what's selected by the user. And there are other ways of doing it, but this seems to work quite well (even if it is a barely decipherable "Update XML" in the Action Tool).

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels