Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Macro to update credentials in Download tool on run time

Raghu_s
8 - Asteroid

Hello! 

Am currently have a tool that post files to the designated FTP servers. Currently I have a bunch of downstream process that requires me to post result files after my daily data processing. Here is the thing, I would like to build a single tool that can be used anywhere in my workflows to post a file.  Currently as the Download can be fed with target URL, it doesn't have a way to pass Credentials details in the input stream. So i had to manually configure the credentials for the download tool every time for different servers and it becomes a mundane job. 

 

Idea: The tool require inputs as - source file, target FTP server URL, Credentials and of course the BLOB file as payload. 

Thought Process: So if am getting these fields as a single record (shown below) from a previous process, the tool should be able to update the values USERNAME and PASSWORD depending on the stream and process the request. 

Trouble: When am able to directly mention the credentials in the Download tool, it works but when I expect it to be updated via the control parameter its not working and throws an error as below. The FTP sites that am using are working fine and I have a macro that helps to post it via the regular way. 

 

Am new to building macros and it would be really helpful to point out my mistakes if any. 

 

 

 

 

Workflow: 

 

FTP upload macro.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

input macro Config:

 

Ftp macro input config.PNG

8 REPLIES 8
Raghu_s
8 - Asteroid

@MarqueeCrew @DanM @JordanM Hello!  Looking for some thought on this idea to work out! It would be nice if any one can share some thought to help me out in this. been trying different ways but the macro is not able to accept the  Connection details I believe. throws a blunt error saying Login Failed, while The FTP address and Credentials are correct. 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Raghu_s,

 

I would use a Text Input tool with these 3 fields (URL, ID, PWD) and use the text box interface tools to update the values in the action.  Then append these fields to your input data stream.  The download tool will pickup the values from the fields and you'll be off and running without issue.  You could use a formula tool and define the 3 fields as an alternative (with actions to update the formula).  I like the Text Input tool approach because it simplifies the testing process for me and I think that it is more readable.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Raghu_s
8 - Asteroid

Thaks @MarqueeCrew! I was sure you would get back on this. Previous posting today, I looked up the building macros to update values using option "Update Value with Formula" to update the files. Am very new to macros and am little clueless on how to update the values in the below scenario. 

 

Idea revisit: So am upgrading my base FTP macro to be an unified Tool to post files from drive to FTP. So ideally I want to have input with File location, target URL and credentials all from a downstream or say input file so I may not require to always key in the FTP server details manually in the Text box or prepare separate tool for every FTP site.  

 

So, int eh edit Formula how do I map the input value [#2] - UN or [#3] - P to the username and Password inputs under Connections tab as its not part of incoming connection in Download tool. Usually if we want to update say, URL value here we can write conditions to replace DESTINATION value but here am not sure how to accomplish it for the other inputs.  Am sure you should be busy, but it would be really helpful if you can throw me a sample skeleton WF using a download tool so I can compare my errors. 

 

Looking forward. 

 

action_update.png

Raghu_s
8 - Asteroid

Any thoughts on this Fellas?

 

Looking forward. 

SophiaF
Alteryx
Alteryx

@Raghu_s - I would use a batch macro instead, since the control parameter of a batch macro can update the Username and Password field from just a row of data (rather than needing to type something in other interface tools).

 

tWJQdQC

 

 

 

Sophia Fraticelli
Senior Solutions Architect
Alteryx, Inc.
Raghu_s
8 - Asteroid

Thanks for the kick. I was trying to accomplish a tool sort of which accept inputs. It works as expected. 

 

Cheers! 

 

 

Sumpfmaus
6 - Meteoroid

Hello Sophia,

 

I tried to implement that approach even before I found that post, but in my case it is not working 😞

I definetely hand over the corrent username and password to the control parameter, but nevertheless I get a "logon denied" when I try to cennent to a SFTP Server via download tool.

Do you have any idea why this is not working in my case?

With a click on the action that is supposed to update the password value, it shows an encrypted string instead of the default password. Maybe I have to encrypt the new password before handing it over to the download tool? What do you think?

 

Regards

Robert

SophiaF
Alteryx
Alteryx

Hi Robert - I don't believe you need to encrypt the string. It should be encrypted once it reaches the text box via the Action tool. I would suggest trying different options in the Action tool (Update Raw XML or Update Value with Formula) to see if the behavior is the same.

Sophia Fraticelli
Senior Solutions Architect
Alteryx, Inc.
Labels