Hi - I have a function that creates a list of date ranges and then for each of those ranges, collect information from a SP list. It worked fine while I was building it yesterday, but then it wouldn't work when I loaded it in the published app. Today, when I run it in the editor, it shows an error of invalid operation/query is not valid. Here is my code:
Clear(colRecords); //clears the colRecords collection
ClearCollect(colNumberPulls, //create collection of date ranges
AddColumns(AddColumns( //add columns for start and end of date range
Sequence( //starting on a launch date of 1/1/21, create a row for each quarter of the year until the current quarter
RoundUp(
DateDiff(DateValue("01/01/2021"),Today()) / (365 / 4),
0)
),
"DateStart", //add column of start of date range
DateAdd(DateValue("12/01/2020"),Value * 3,Months)),
"DateEnd", //add second column, which is 3 months after the DateStart value.
DateAdd(DateStart,3,Months)
));
//this collection results in date & time stamp saved to both of the date fields.
//This is the For All loop that fetches data from a SP list where a date field falls within the ranges
ForAll(colNumberPulls,
Collect(colSPRecords,
Filter(SPListName,
Status = "Closed",
'Publish Date' > DateStart,
'Publish Date' <= DateEnd
)
)
);
The "Filter(SPListName..." portion is all highlighted with the mentioned error. "The requested operation is invalid. Server Response: SPListName failed. The query is not valid." Troubleshooting, it DOES get data if I hard-code a date in place of the DateStart and DateEnd fields in the last filter section. So, it's as if it's failing to recognize that those fields are date values or where those values are pulling from?