Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to input the outputted files in the same workflow and upload using Powershell script

Pankhudri20
8 - Asteroid

Hello,

 

I am looking to upload the files created in my workflow.

The output tool creates multiple excel files. I then input them using dynamic input and run the script to upload.

However, it is writing all the records in the batch file instead of excel files.

Can anyone please tell me how to resolve this?

 

I am really stuck at this point and it is urgent to resolve this.

Any help would be greatly appreciated.

Pankhudri20_0-1618584755653.png

It writes 194252 records to the batch file.

But it should write only the 6 files to batch file.

number of files created is dynamic. It is an automated workflow which runs every monthly fiscal period and creates weekly files for that period. These files need to be uploaded using the command.

 

Thank you

Regards,

Pankhudri

4 REPLIES 4
T_Willins
14 - Magnetar
14 - Magnetar

@Pankhudri20 

 

Why do the files need to be brought back into the workflow to upload them using the command function.  Please advise if I am incorrect, but it looks like you are trying to create 1 or more .CSV files, then use the Run Command tool to upload those files.  Instead of bringing in the files with the Dynamic Input, try extracting the relevant filepath information using a Summarize tool (where the Dynamic Input tool is now) using Group By CSV name, update the filepath using the Fomula tool as you do now, and keep the Select tool and Run Command tool as they are currently configured.  This should reduce the number of rows only to the number of output files (6 in your example) that are read to the Run Command tool. Let me know if this works or we can troubleshoot further.

Pankhudri20
8 - Asteroid

Hello @T_Willins 

Thank you so much for your prompt response!

 

The group by option in summarize worked in reducing the number of rows.

However, powershell gave an error.

Can you please tell me what does this error mean?

 

Pankhudri20_0-1618603020599.png

Regards,

Pankhudri

T_Willins
14 - Magnetar
14 - Magnetar

Hi @Pankhudri20,

 

This looks like it is a PowerShell error and not an Alteryx error.  Without diving into the code, this would be difficult to diagnose.  Does the code run without error when you run it outside of Alteryx?

ups366
8 - Asteroid

Dear, hello!

 

you need check your power-shell code for running right. If you upload some sample files like .yxmd or .ps, maybe we can help you.  

Labels