Item Saved Search: Criteria (Numeric Formula): CAS...
# administration
m
Item Saved Search: Criteria (Numeric Formula): CASE WHEN {transaction.type} = 'Cash Sale' AND ROUND({today} - {transaction.trandate}) > 30 THEN 1 ELSE 0 END The above works fine, however, I need the Maximum of the {transaction.trandate}. Adding max() to it errors out. Any ideas how this would need to be structured, if at all possible?
d
Could make it a summary search by setting the "Summary Type" to "Maximum" (and other fields to "Group") If you need fields other than date from that Cash Sale record, you'd use When Ordered By Field option
note that having
{transaction.trandate}
in your results will exclude any items that have no transactions linked to them
m
You mean it would exclude if they were part of the criteria, right? Not results.
d
sorry, I'll rephrase. Having reference to the transaction join in either the criteria or results (like above) will mean that items without transactions (i.e. those just created) will not appear in the results
m
Having this on an item search results will simply show the trandate if one is available. CASE WHEN {transaction.type} = 'Cash Sale' THEN {transaction.trandate} END
👍 1
I think I've gotten it as close as I can via search. I'll just need to filter the results a bit.