Alteryx Designer Desktop Discussions

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

How to pass Parameters at run-time?

Rekha
Átomo

I have a table which holds data for various years. Is there a way that I can fetch only one specific year's data for processing during run-time without hard coding the year?

Example, when I run a workflow I should get a pop up asking to pass the year and once I type it in (Eg: 2015) it should fetch only those records belonging to 2015 from the Database(SQL Server).

3 RESPUESTAS 3
s_pichaipillai
Cuásar

@Rekha

 

convert you workflow into App then add interface to the workflow and connect to the Filter tool and update the action to the value provided thru GUI

 

 

s_pichaipillai
Cuásar

May be this example would help you

 

i am using Adventure works database and using the below query for WorkOrder Table. 

Note: my filter for this query is YEAR(startdate). this is the value can be dynamically set in Alteryx

SELECT   [WorkOrderID]
      ,[ProductID]
      ,[OrderQty]
      ,[StockedQty]
      ,[ScrappedQty]
      ,[StartDate]
      ,[EndDate]
      ,[DueDate]
      ,[ScrapReasonID]
      ,[ModifiedDate]
  FROM [AdventureWorks OLTP].[Production].[WorkOrder]
  WHERE YEAR([StartDate])='2006'

Add the Text box from interface tools and connect to the Input tool whcih we used for SQL connection 

and in Action update the value and replace the 2006 for the where clause query 

Year.PNG

take a look at the sample and let me know if this works

Rekha
Átomo

Thank you. It helped. :)

Encuestas
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Etiquetas