Skip to main content

I am putting a date in a list using NWC, and trying to build a site workflow comparing the date stored to the current date. I want to pull any items with a date less than today's date. 

 

In the site workflow, I created a variable to store the current date, then in the O365 list query, I set it to look for any items with dates less than the variable and send them to a collection. My sample data has 2 items with dates less than today, and one in the future, so this should be pulling the two items.

However, I got an empty collection. So I logged the date variable and the collection items and here's the results:

9859i78D3949AA4632094.png

It displays correctly in my list:

9863i46B76EA216EC678F.png

The only reason I can see that it wouldn't work is the date formats, but there's no way to change that on the variable or in NWC, at least not that I can find. 

TIA

 

@AnneC So is the issue only happening if the date is coming from NWC? Dates manually added on the list work?


Nope, the problem appears to be when I use O365 Query List. SP Query List works with the same data. Problem is, SP query doesn't allow a variable for the list name, O365 does. The items in my list have libraries associated with each item, and I want to also update each library, not just the list item. The list item has a field for the library name that I intended to pass to O365 query. Right now, I am using the explicit name in O365 to test and troubleshoot just one thing at a time.


Got it! The problem was the date format. I had to enter the variable for today's date using "Advanced Lookup" in the filter, and changing the format from String to ISO. And it only took 24 tries, lol.


Reply