Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Prioritizing Run Command to Copy a Template

KamenRider
11 - Bolide

Hi everyone,

 

I have a problem in running by sequence between the run command and my working workflow. What happens is that the data is not copying on the template and the way see it is that maybe because my working workflow run first before the run command. Please see my screenshots below.

 

Copy Template.PNG

Results Window.PNG

My question is that what will be the best solution to make the run command run first in order for me to successfully copy the data in the template.

 

Your help is very much appreciated.

 

Thanks,

Kamen

 

16 REPLIES 16
DavidSkaife
13 - Pulsar

Hi @KamenRider 

 

One option is to use the Block Until Done tool (under Developer tab in the ribbon), configured like the screenshot below:

 

DavidSkaife_0-1671453813969.png

 

The Run Command tool will run first, and only after this has completed will the next stream run.

KamenRider
11 - Bolide

HI @DavidSkaife 

 

Thanks for the response. I already thought of the "block and done" however my question is how I can connect it with other workflow since it has its own input file. Please see attachment below.

 

Can you please let me know where to insert the block and done tool?

2 Workflows.PNG

Looking forward.

Kamen

DavidSkaife
13 - Pulsar

Hi @KamenRider 

 

Ah ok, so they are separate streams? You have two choices then:

 

Download the CReW macro pack here http://www.chaosreignswithin.com/p/macros.html and use the Parallel Block until Done tool, or, if you're unable to do that try option B

 

Option B - workaround:

 

DavidSkaife_0-1671459467924.png

  1. create a dummy field (in my example i've called it Dummy Field)
  2. place the Block Until Done tool before the Select and Run Command Tool
  3. in that Select tool remove the Dummy Field
  4. Append the Dummy Field only to the other workstream
  5. use another Select Tool to remove the Dummy Field from the downstream
  6. carry on with the workflow as normal

This should cause your workflow to execute the Run Command first, and then once completed run the rest of the workflow. I've attached my dummy workflow so you can see the principle of it

KamenRider
11 - Bolide

Hi @DavidSkaife 

 

I've tested your workflow however I still have problems with the results. My 2nd workflow still overwrites the first row with format. What should I do in order for the 2nd workflow to ignore the header so it won't overwrite the formatted temaplate?

 

Sample Template - it is formatted with color on the header.

Template Format.JPG

My 2nd workflow (sample)

Other Workflow.JPG

This is the results I am hoping for:

Should ResultJPG.JPG

Looking forward

Kamen

DavidSkaife
13 - Pulsar

Hi @KamenRider 

 

Here is one way of doing it:

 

In the Output tool when you select the excel file, tick and specify a range that matches the columns you're outputting data to:

 

DavidSkaife_0-1671461872550.png

 

Then set the tool up as follows, noting the Output Option and the Preserve Formatting tick:

 

DavidSkaife_1-1671461938455.png

 

 

KamenRider
11 - Bolide

Hi @DavidSkaife 

 

I changed the output file configuration and it is not working. I forgot to say that I have a formula tool that allows the output tool to change the file path. My formula tool has this:

 

FileGetDir("FullPath\Output") + "Report.xlsx" + "|||" + "Sheet1"

 

Is there a way to indicate the row and columns? I'd like to start with A2 to exclude the header because I have a header formatted?

 

Please advised

Kamen

DavidSkaife
13 - Pulsar

Hi @KamenRider 

 

All you should need to do is update the formula to FileGetDir("FullPath\Output") + "Report.xlsx" + "|||" + "Sheet1$A:D"

 

Don't worry about starting on A2, as long as you tick the Preserve Formatting on Overwrite in the Output tool it will keep the formatting on the header

KamenRider
11 - Bolide

Hi @DavidSkaife 

 

Your response below works for my first template to output file. However in my 2nd template, no data were copied. It was able to copy the template to the output folder but no data. I did the same like on the first template. Am I correct to below screenshot for having the 2nd template? What do u think did I missed? Why I was not able to capture the data on the 2nd template?

 

Two Template.PNG

Please advised,

Kamen

DavidSkaife
13 - Pulsar

Hi @KamenRider 

 

Is it the same data you're writing to the second template? Are you able to share the workflow as it's tricky to troubleshoot from screenshots

Labels