Alteryx Designer Desktop Discussions

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

update a field for an input tool (Amazon S3 download) without user input aka formula input

msonnenfeld
6 - Meteoroid

I am trying to update a field for an input tool (Amazon S3 download) without user input.  The file location changes based on the date, so in order to pull data I would need to update the flow every day.  The Bucket format is  ".../[User]/[Location #]/[yyyymmdd]."  I want to schedule this on server to run every day and pull the latest file.  In order to do this I need to update the [yyyymmdd] part to something like...

 

ToString(DateTimeYear(DateTimeAdd(DateTimeNow(),-1,'days')))+
ToString(DateTimeMonth(DateTimeAdd(DateTimeNow(),-1,'days')))+
ToString(DateTimeDay(DateTimeAdd(DateTimeNow(),-1,'days')))

**assuming there is a better way, just throwing this out there...it also doesn't account for 2 digit day.

 

My issue is getting the Bucket Field to update without any user input/questions.  Does anyone have a solution or something similar?

 

Assuming this is going to be a flow that runs a macro on server, but I'm not sure how to use the input tool to update the Bucket field since you can't use input as a question.

 

Thank you for your time & help

1 REPLY 1
msonnenfeld
6 - Meteoroid

Figured this out!

 

I used a standard Macro and was able to schedule this on server.

 

Build Macro

  1. Click on canvas > go to workflow tab > Select Macro & drop down is Standard Macro
  2. Add Action from Interface
    1. For selected action select "Update Value with Formula"
    2. Select field you wish to update (in this case its "Bucket" or the 3rd selection under Amazon S3 Download")
    3. Formula **Your file path**+
      ToString(ToString(DateTimeYear(DateTimeAdd(DateTimeNow(),-4,'days')))+ToString(DateTimeMonth(DateTimeAdd(DateTimeNow(),-4,'days')))+ToString(DateTimeDay(DateTimeAdd(DateTimeNow(),-4,'days'))))
  3. Link Action to input tool
  4. Format as needed
  5. Add macro output tool from interface
  6. Save

Open new standard workflow

  1. Right click on canvas and go to insert > macro > "Saved macro from above"
  2. Add any additional formatting & outputs as needed
  3. Save to server & Schedule 
Labels