Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Entering data to SharePoint list based on Months

swapsingh2712
8 - Asteroid

Hello All,

 

 

I need to create an alteryx workflow which will pull the data from the database. Now I've a query to pull the records, but in the workflow a copy of the data will be loaded for the current month, and all future months.

 

 


For example -  I've 20 records in the database. If the workflow is running in June, data should be populated for June – November (6 months forward). There would be 20 records for each month. Only difference would be the month.

And If I'm running the workflow in July, It should delete the data for June month and populate the data from July to December ( 6 months)

Please advise

 

2 REPLIES 2
CarliE
Alteryx Alumni (Retired)

@swapsingh2712 

 

You can do something like this:

CarliE_0-1654654686300.png

 

Create a month field based off of the date field -- DateTimeMonth([DateField])] and then filter for the month that is greater than or equal to the month of today and less than or equal to 5 months out -- 

[Month]>= DateTimeMonth(DateTimeToday()) and [Month]<=DateTimeMonth(DateTimeToday())+5

 

If you dont want to create a new column of month you can also just do this in the filter in one shot:

DateTimeMonth([DateField])>= DateTimeMonth(DateTimeToday()) and DateTimeMonth([DateField])<=DateTimeMonth(DateTimeToday())+5

 

Based off of the month of today (June)

Here is the output of my true set:

CarliE_1-1654654907969.png

 

Here is my false set:

CarliE_2-1654654930656.png

 

 

After that, you can use the Sharepoint List output tool to delete the list in sharepoint and append.

 

 

If this solution was helpful, please mark this as a solution to help other members on the community out!

Thanks

Carli
CarliE
Alteryx Alumni (Retired)

@swapsingh2712,

 

Checking in to make sure this is a viable solution for you

Carli
Labels
Top Solution Authors