RE: Map/Reduce getInputData Saved Search w/ Multiple Formulas

I have a saved search with multiple results that are formula(text). I need to process the data from this saved search in a M/R script.

I’m loading the search from a parameter on the script, then passing it from getInputData to map. When I read the mapContext.value, all of the formulatext columns have been collapsed into one in the resultant object because formulatext is not a unique key.

Is there a way to define how the mapContext.value result is formatted? All of the columns have unique labels, so ideally that would be what I’d like it to use. Or really, any other way to tell the system not to use formulatext as the key repeatedly so it doesn’t overwrite the existing data.

If not, are there other ways around this?

aleseux Rookie Asked on April 4, 2023 in SuiteScript.
Add Comment
2 Answers

Create your data object from the search results data and then return that JSON object for your datasource.

var data = { Field1: resultsColumn1, Field2: resultsColumn2….}

 

Beginner Answered on April 4, 2023.

Won’t I run into the 1000 record limit SuiteScript has for saved searches in this case?

on April 4, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.