Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic Input met error but can run successfully

Microzzz
5 - Atom

Dear Experts,

 

I generated a workflow which can get latest file based on filename with date, and output as well a dynamic filename with date.

Dynamic Input is used and can run successfully, but always met problem upon opening the workflow in the Dynamic Input saying " File selection does not contain data; select a valid data file."

The problem resulted in further problem that it can't be uploaded Alteryx server.

Please refer to attached screen-shot for details.

 

Thanks and BR

 

Micro

6 REPLIES 6
OTrieger
12 - Quasar

@Microzzz 

How did you set the Dynamic input tool?

Raj
16 - Nebula

@Microzzz 
the configuration of your dynamic input tool is not correct
reconfigure this correctly and this should work.

NeoInfiniTech
11 - Bolide

Hello @Microzzz,

 

Having looked at the screenshot you shared, I would like to point out these issues/recommendations:

 

1. What is the format of your input files? CSV, TXT or Excel (or something else)?

2.  Your input data template points to folder, while it needs to point to either a template filled with dummy values (recommended) or one of the files that will be read in (less dynamic and can produce error)

3. As Action, you have to select "Change Entire File Path" instead of the default option of "Append Suffix to File/Table Name"

4. If you are reading in an Excel file, you also have to append the sheet name to the file name. If sheet names are always the same, you can modify the FullPath as follows: [FullPath] + "|||" + "YourSheetName" before adding a Dynamic Input tool.

5. If there are more than one standard sheet names, you have to list them in a Text Input tool and append the Text Input tool to the data stream and use the formula above, now configured as [FullPath] + "|||" + [YourSheetName], now added as a variable instead of the hardcoded sheet name in the previous example.

6. As Dynamic Input tool is likely to produce an error if used with multiple Excel files or sheets where a column of the Excel file can be empty in one and not empty in other, or one Excel file contain a column with Unicode characters and the other file's same column does not contain Unicode characters, that can also cause errors.

7. If the files do not share the same column arrangement or number of columns, it will also cause to read the files partially or not at all.

8. If using CSV files as input, you need to ensure that all the files share the same schema, column order, delimiter & encoding and ideally do not contain any newlines in description / free text fields.

 

Alternatively, you can use a macro such as the CSV Friendly Multi-Input (Inspired by CReW Wildcard Input) I have built (please make sure to follow the instructions under the Description section), which wouldn't be possible without the amazing CReW macro set, provided you correctly package the workflow with the macro (using the Export Workflow option under the Options menu) to ensure it will run correctly without errors (in most cases).

Microzzz
5 - Atom

Thanks NeoInfiniTech!

The input file is a TXT file, and my purpose of  this workflow is to generate a dynamic Excel file with name containing latest date, the source files are TXT file s downloaded from SAP every day with dynamic file name with dates.

The source folder contains files with filename like PO_Cofirmation_20241104.txt, PO_Cofirmation_20241105.txt etc., I pick the latest one PO_Cofirmation_20241105.txt as input file, and output filename is PO_Confirmation_Checked_20241005.xlsx.

If I put one specific file name in the Dynamic Input, it is not my purpose, I need to get the latest one based on filenames like PO_Cofirmation_20241105.txt.

So I have to point a folder there in Dynamic Input, and "Append Suffix to File/Table Name", it works. the workflow runs well in my local computer.

And I tried "Change Entire File Path", it seems not work.

Could you please advise how to point to a template filled with dummy values for Dynamic Input ?

 

BR

 

Micro

NeoInfiniTech
11 - Bolide

You're welcome @Microzzz.

 

I would expect Change Entire Full Path action to work however, provided that the FullPath is selected as the Field, which is what's necessary to be able to point the Dynamic Rename tool to the TXT file located in a network path correctly.

 

As for the template file filled with dummy values, you would have to create one yourself, but that is fairly easy. The only thing you should make sure is that the generated TXT files will always have the same field (column) names, which are not variable in size due to the maximum length of the extracted data (something that tends to happen in SAP if not extracting with technical names or column length is not explicitly set for example). 

 

To create the template file, simply copy one of the TXT files to a new folder under the parent directory (for example [first part of the directory]\sppa_sapdata\AP8\PL_Template\), then rename that file to PO_Confirmation_Template.txt. Then open that file in a text editor (i.e. Notepad) and delete all lines that come after the header row and the first data row.

 

Now you have obtained a template TXT file you can use (expected FullPath for the template file would be [first part of the directory]\sppa_sapdata\AP8\PL_Template\PO_Confirmation_Template.txt), which must be specified by clicking the Edit button under the Input Data Source Template section.

 

After you select this file, click anywhere on the input settings below and a popup will appear, telling you that this file is not recognized type. At this point, you will have to select the option Read it as a delimited text file and choose the appropriate delimiter below.

 

After choosing the appropriate delimiter, you will have to keep scrolling down the configuration list until you configured every setting correctly (Field Length, Ignore Delimiters in Quotes, Encoding [can be seen by opening one of the TXT files in a text editor and looking at the lower right corner]) and click OK. Now the file should be able to be read in correctly without any errors.

 

Hope this helps.

Microzzz
5 - Atom

Thanks!

I created the template file PO_Confirmation_Template.txt and tried, but came a file named PO_Confirmation_Template.txt.txt, there are double .txt, I don't know why?

Then I recreate a template named PO_Confirmation_Template without extention, it works!

 

Labels
Top Solution Authors