So I thought I'd share this bug I've just encountered
It looks to me like when you run an existing saved search using a script the search doesn't use the When Ordered By Field value in the saved search to compute search result values.
The result is that I get different values for a column when I run it in my browser vs when I run it in a script.
jkabot
01/16/2019, 6:15 PM
My workaround is to compute the value using a formula instead of the When Ordered By Field setting.
The script gets the same value for the formula as running the search in my browser.
MIN({target_value}) KEEP (DENSE_RANK FIRST ORDER BY {sort_value})