Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to set a variable range in output data tool

vj28
8 - Asteroid

I have excel sheets, sheet1 and sheet2. I use output tool's overwrite sheet/range option to overwrite columns from sheet1 to sheet2. 

 

Currently my range looks something like :-

|||sheet_name$A1:AP3162 

 

I want the end row number range to be dynamically set instead of typing something like 3162

 

Also sometimes the number of rows in sheet2 are more than sheet1 and vice versa, so ideally I want it something like :-

|||sheet_name$A1:AP[var1 +var2]

where var1 and var2 are the number of rows in sheet1 and sheet2 respectively. 

 

But I'm not sure about the syntax needed to implement this. I looked it up and couldn't find anything in the documentation for the output tool either. 

5 REPLIES 5
alexnajm
18 - Pollux
18 - Pollux

Wherever in your workflow you have the total count, branch off to a Record Count tool, Append Fields back to the data, and reference that new Count column in your Formula!

vj28
8 - Asteroid

@alexnajm Thanks for the response!

 

I'd also like to know what the syntax for inserting a variable as part of the file path in the output configuration is. 

 

 

alexnajm
18 - Pollux
18 - Pollux

Like you alluded to, it'll be "|||sheet_name$A1:AP"+ToString([Count])

vj28
8 - Asteroid

I still don't get it, what would the syntax be if I wanted to use a variable in the path? Where would I need to declare and initialize said variable? Perhaps this is too basic a question, but I'm new and the documentation doesn't seem to detail this anywhere. Thanks. 

alexnajm
18 - Pollux
18 - Pollux

As long as the variable is available in the data, you can reference it in the Formula. If it doesn't exist, you need to create it!

 

If you give more detail, we can help further - without seeing the workflow/data, it's hard to help

Labels
Top Solution Authors