I'm creating a search on a MR script at the getInp...
# suitescript
m
I'm creating a search on a MR script at the getInputData stage. Is there a way to know the count of results that search is getting before actually moving onto the next stage or processing them?
b
run it as a paged search to get the count before returning it
keanu thanks 1
s
I'm more inclined to ask why you want to know that
m
@Sandii because I think my search is returning like 10,000 results instead of the 1 I'm expecting. I recreated the search on the GUI and I do get 1 result
My script ran for 4 hours
s
You can get how many times the map was called during the summarize stage as well, rather than running your search just to get the count and then running again by returning it
m
yeah, I wanted sort of get the number of results my search was getting at the getInputData point and then adding a return false; line to terminate the executions right there, and avoid having to wait for it to run a large amount of data
s
yeah i would recommend not testing your search in the getInput, test and get the results before taking the search to MR at all
m
You got a good point. Maybe create the search on the GUI and then just load it in the MR and see if it behaves as expected?
s
you can either create in UI and export to script, or if you already created it in script, just test it in the console on any record page