AnsweredAssumed Answered

Compare today's date to mm/yyyy column

Question asked by webharvest on Nov 9, 2015
Latest reply on Nov 11, 2015 by webharvest

I'm creating a list to use for displaying a graph of count vs MonthYear.  The count is how many items were created in a different list in a given month and year.  The MonthYear column in this list is a text string with mm/yyyy format.  Currently I manually add in the new mm/yyyy into the list which isn't very efficient.  I wondering if I could create a workflow that would look at today's date and if the mm/yyyy doesn't exist in the MonthYear column of my list it will create a new list item with that mm/yyyy in it.

 

So for example lets say my list has the following items:

MonthYear                    Count

08/2015                             15

09/2015                             20

10/2015                             8

 

So on October 31, 2015 when the workflow runs today's date is 10/31/2015 and the workflow compares that to all the MonthYear items and sees a 10/2015 item exist so it does nothing.  On November 1, 2015 when the workflow runs today's date is 11/01/2015 and the workflow compares that to all the MonthYear items and sees no items exist that has the 11/2015 entry so the workflow creates a new item in the list with a MonthYear of 11/2015.

 

It seems simple enough but I'm not sure how to go about doing it.

Outcomes