Hi all, I've been wracking my brains on how to ret...
# general
b
Hi all, I've been wracking my brains on how to return only the most recent transaction (based on a custom date field on the Sales Order - but I could work with {trandate} too) in a Saved Search result, so that I can run a Workflow on that and only that (ie, to send one reminder email). I've been messing around with GREATEST functions and MAXIMUM as a Summary Criteria and can't seem to get it to work. I've event tried coming at it from the Customer angle and creating a Customer Saved Search and using GREATEST on {transaction.trandate} but no luck. My guess is that this should be easy but can't figure it out.
b
im not sure about the workflow part
but you can usually just use summary columns for a regular saved search
b
That works great for displaying results, not so much for filtering - the Summary Criteria don't let you pick "Maximum" without other criteria - it has to be within this week, this year, etc., there's no "of all time" option as far as I can tell
More specifically, when I try "Maximum" and "Within All" for Description it doesn't let me add the criterion
b
whats a screenshot of what you are trying?
b
This is the screen I can't complete the criterion:
I think I can just use the results from this Saved Search and send a scheduled email, I'll just have to see how well the formulas I need work in an email, as I need it to send one email if the date range is within this week, and another if older; but with a properly set up CASE statement I think I can make it work.
b
not sure what formula you are trying to use, but a summary criteria only works if you have summary columns
g
Would answer ID 85051 help get the results?
message has been deleted
b
like that answer, beautiful summary columns
b
Yes that's super helpful! Now I just need to get my CASE Statement to work
peanutbutterjellytime 1
And now I think that's working too! Now I can test with email subscription to the search, no need for a workflow. Thanks @battk and @Gregory Jones for your help!!
g
Awesome! Happy to help.