We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
fireworks

Using Batch Macro To Create Dynamic Number of Tabs On Server

dougop
7 - Meteor

Hello All,

 

I am having issues with WFs I have created and put on Server not being able to write to tabs in the same file, even with control containers/block until done tools used, however the WFs work fine when running off of Desktop.  It seems to be that the tabs are being written to quickly and the tool does not have the time to close then open the file even with the aforementioned tools being used.

 

Is there a resource describing more in depth the the batch macro method for creating dynamic number of tabs in the same file?  I have looked through the community and there is a great explanation by @mceleavey in this discussion below but I am trying to follow but could not quite get the process to work.  I dont know if there is a more detailed or even video explanation of what was being described here?

 

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Excel-Multiple-Tabs-Error-Unab...

 

Thanks,

 

Doug

3 REPLIES 3
apathetichell
20 - Arcturus

I assume you are loading your files file file browse on Server?

 

Assuming so:

I've written about this a few times. File Browse does not create a static location for your file. It loads the file you input into a temp location and temp file. You must retrieve that filename/location at run time --- and create a variable of it via formula tool. You must output that file at that location in your output data tool  if you want to be able to download it after running.

 

If you are using a template blob - you must copy your template blob to a location you create in your formula tool and  you must update and  output at that location

 

If you are using a static location for a network drive:

You are thinking of this wrong - your file browse tool is set up wrong --- you do not want to load the data (at least not first) - you want to capture the text location of the file you are inputting. You need to capture that selection (I might use a drop down to prevent this confusion) --- and then load your file via batch macro. You want to output to that network location.

dougop
7 - Meteor

I am not sure what you're describing - seems like you are talking about inputs i am talking about outputting data into multiple tabs (a dynamic number) using a batch macro instead of writing a dynamic formula and then using control containers to output to multiple tabs.  The latter process works on desktop but I am finding that it is not working 100% of the time on server (have noticed it more with the latest version of 2024.2).

 

Basically would like to know if there is more resources or a more in depth walkthrough of the attached screenshot from an earlier discussion.  I cant quite get the macro set up to work.

 

Thanks in advance

 

Doug

 

 

 

apathetichell
20 - Arcturus

Hey --- yes --- you are correct - I thought your issue was updating a specific file (ie the file I select at run time on Server is not the file which is updated and/or not all tabs appear). That is not your issue. So is what are you are saying is:

 

1) I am creating a range in a formula tool in a batch macro.

2) the range is working for some tabs.

3) other tabs are not being written - and or I'm getting a file open error

that is 100% totally different.

 

I would say double check your ranges that you are dynamically creating to make sure they exist. If you are getting file open errors with a batch macro --- with one output tool - and with no other potential users using that file---- and this only started in 2024.2 --- it's a bug. open a bug ticket. That should not be happening.Batch macros should be running one iteration at a time and should be closing the file after writing.