```function getInputData() { let mySea...
# suitescript
e
Copy code
function getInputData() {
            let mySearch = search.load({
                id: 'customsearch_wf_qual_pc_email_fields',
            });

            log.debug({
                title: 'mySearch',
                details: mySearch,
            });

            return mySearch;
        }


        function map(context) {
            log.debug({
                title: 'context',
                details: context
            });
         }

.....

    return {
            getInputData: getInputData,
            map: map,
            summarize: summarize
        };
mySearch gets logged, but context doesnt. The search has search results and is a public search. Any ideas why context wouldn't be getting passed into the map section?
s
if there was an error prior to that debug call. Might want to confirm results/errors in summarize to shed some light on what happened.
e
No errors at all in the summary
Hmmm... so if the search has 1 result,
context
isn't being logged. But if it has more than 1 result,
context
gets logged....
e
Curious if anything changes if you debug context.value in the map function rather than just context.
e
@eblackey Still nothing if I log
context.value
From testing, anytime the search has > 1 result, everything works as expected, but when there is only 1 result, the map function isn't called