Hello,
I have a challenge with a workflow containing a macro when uploading on Alteryx Gallery, giving me the below error:
I have downloaded a while back a macro with several macros built in for Dynamic Calculation (transforming a text with a formula into a calculation).
The workflow worked very well in Alteryx Designer, but when I tried to upload it into Alteryx Gallery, it gave me the error that it cannot find the in-built macros (level 2 & 3).
That was because I was not able to see them under "Workflow Options --> Manage workflow assets". I have found here that I need to make available the option of Assets - Auto-detect assets". I did that for all the macros, but then I have this error.
Please bear in mind that if I try to delete the macro and readd it in Alteryx Designer, it works very well in Designer. When trying to upload on Alteryx Gallery, something changes because it cracks everything - I cannot run it either in Designer.
Could anyone advise what I should do? I am uploading the Macro used.
The error is coming from the last Macro:
One level above - This is from Macro "DynamicFormula"
I do not know if the below notification has anything to do, but this appears when opening last macro - DynamicFormula.yxmcbatch (it shouldn't based on what is written, but I wanted to mention it as well):
Would highly appreciate any support!
Thank you!
@stefaniadurdan - are your designer and server on the same version? Perhaps your server is "behind" your designer?
@DanielG , not the case. My server is 2021.4.2 and my Designer is 2021.2.3. I also tried to upload from a Designer version 2020.4. I also thought about the version not working properly. But I face the same error on both designer versions.
Do you have anything else in mind?
Thanks!
@stefaniadurdan -- the next thing I would try would be regarding loading the macro assets with the workflow to the server. See this old post which outlines it better than I could explain it. https://community.alteryx.com/t5/Alteryx-Server-Discussions/Gallery-Upload-macros-within-macros/td-p...
It packages the macros with the workflow when it is loaded. When you have macros within macros you sort of have to do it in layers. The assets icon isnt displayed until you update user settings here.
@DanielG , yes, I did that too. I did not do it at the beginning and I searched in this community finding this workaround. I am able to see all macros in the Asset Management when trying to upload on Alteryx Gallery, but I still receive this error. Before doing that, the error was "Not able to find Macro X", but now it changed into this one that I have shared.
I am surprised that it works on Designer and once I upload it into Alteryx Gallery it crashes also the version in Designer and it does not work anymore.
@stefaniadurdan - Sorry I forgot you had referenced the workflow assets in your original post when I wrote my second post... However, just to clarify, you have done it for every layer EXCEPT going into the last macro at the lowest level? Not just at the workflow level? You have to start at the bottom and do each level until you get to the workflow. If there are macros within macros within macros, you'd do it for every layer except the very bottom macro. This is the way I had/have always done it. If anyone else knows of a better/more efficient way please comment on here, as I'd love to learn that too. 😁 And hopefully what I just wrote makes sense. Please tell me if I missed the mark on that too. Thanks.
The CReW macros have lots of interconnected components that do not easily get packaged up. The best way to deal with this is to ask your Alteryx Server admin to install the CReW macros on the Alteryx server. When installed there, you won't even have to include the macros when you export the workflow. The server will automatically find the macro in the macro path.
Dan
@danilang is correct - but the core issue is that any macro saved into your root macro directory will not be uploaded as a workflow dependency. Alteryx view these as "out of the box" - and not specifically related to your workftow. You will often not have the option to include these macros when packaging in .yxzp or when uploading to gallery. A good test would be to send this to a co-worker as a .yxzp and seeing if they can run once extracted.
@apathetichell & @danilang - Why wouldn't packaging them as workflow assets do it? I have never used KREW macros, but it works fine for regular self-developed "macros within macros within macros". As long as the files are packaged with the workflow, there shouldn't be an issue. The layering is where the complexity can occur, but as long as you do it in the right order, I have never had an issue.
If you can get the Server admin to do it, that would be great but I'd still like to learn more about why packaging doesn't work here.
Of course, answering @stefaniadurdan is the priority here, but still I'd like to gain some knowledge myself. 😀
In many cases Crew Macros are installed in the root macro directory and would not be viewed by Alteryx as a dependency of the workflow (vs a dependency of the system) - here's a test.
build a two tool workflow - text input/multi-field binning.
upload to server.
see if you have the option to upload multi-field binning to server along with your workflow.