I'm needing to run a search where I can assign a score value to each result so I can then grab the results with the highest score.
What is the best way to add in a value to each search result?
p
PNJ
11/23/2020, 5:32 PM
Use a formula with a
case
statement that scores based on whatever criteria
d
David Hayden
11/23/2020, 5:42 PM
Let's say the formula is too large for that. So I am using the script to determine a score using an algorithm but I need to append a score value to each result I return.
I don't have much experience working with searches within SuiteScript so I don't know the best method to do that from within a script.
s
Sandii
11/23/2020, 5:52 PM
Build your own object as you loop the search results, and add the data you want from the search as well as your information from your algo