Turns out the issue was elsewhere, not in the OQL above. Has anyone found a way to display the %MonthLength% in OQL and not just use it as criteria? I’m unsure how to validate how %MonthLength% is calculating unless I can see the value. Does anyone have any documentation on how %MonthLength% is calculated?
I highly recommend you pre-calculate those values as variables in your microflow, and then pass them into the OQL statement instead of using these tokens. This is especially important when it comes to date math on months which have variable lengths.
I think the challenge I ran into using a variable and then passing into the OQL is, the OQL has limitations as to what kinds of date field criteria it supports, i.e., limited date functions. Can you suggest a date function that would work in OQL if I fed it a var parameter to do a rolling 12 months back calc? Appreciate any tips
You know what, I just realized I can just calculate the minimum and maximum date for rolling 12 months, put those in date vars in MF, and then feed those date vars into OQL … I will try that