How to append(add suffix) output file name with first value of a column in input file?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have got a requirement in which I need to append(add suffix) output file name with first value of a column in input file.
My input file has date_column. I need to add the first row value of this column to the output file(excel) as suffix.
Please suggest.
Solved! Go to Solution.
- Labels:
- Developer
- Developer Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@areeba — Can you attach sample data for input and desired output, both?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
See the attached. I believe this is close to what you are asking.
Split the date from the rest of the data, then build the output file name as a string.
Hope this helps. If it does, please mark as solved.
Thanks,
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@PhilipL
Please see attached example_file that also has sample data.
I need to fetch first value of column date_delivered and suffix it the file output file name.
So the output file name should be like example_file_1-1-2020 in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @areeba ,
Here is a workflow for the task.
Input:
Set below option in input tool to get filename
Output:
Created file name based on first value
Workflow
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind😀👍
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Atcodedog05,
Thank you for your reply. Yes , it matched my requirements but not 100%.
Please see this above screenshot this is my workflow and as you can see my output file name is different than my input file. My input file has that column (c029) whose first row value (2020-06-30) needs to be attached/concatenate with my output file name i.e. My output file name should appear like this 'New_cpa_Adjustment_2020-06-30.xlsx'. I am able to fetch this column c029 before Summarize tool , after this I am stuck to proceed. can you help ?
Since I am new to Alteryx ,my apologies that I couldn't make you understand clearly.
Thanx
Areeba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @areeba ,
With few modifications provided solution will work for requirement.
Give me some sample data about 5 rows should do and the workflow i can modify it for you 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Please find attached sample file.
Thank you
Areeba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @areeba ,
Here is the modified workflow.
Workflow:
Where you see only c029 selected that branch it taking the first row value. Formula is used to set the filename. And make sure your calculation OutputFileName is going till the end to output tool.
Output:
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi atcodedog05,
Thank you for the solution, it did append the date at the end of outputfile name but but i figured that my outputfile has a extra column called 'OutputFileName' which my client doesn't want to see.IF i deselect that with the help of SELECT Tool then my output throws error.Please see below the screenshot of workflow.
Also, Is it possible that i parameterized my input and output file like on run time i pass the values?
Thanks.
Areeba
