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).
Solved! Go to Solution.
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
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
take a look at the sample and let me know if this works
Thank you. It helped. :)