Is there a way to, on Map/Reduce scripts, to someh...
# suitescript
s
Is there a way to, on Map/Reduce scripts, to somehow use global variables? I have to do a search lookup every time I hit inside a reduce, and really this only needs to happen once. So if I have 5000 entries, I have to query the db 5000 times
m
You can set a script parameter and use that as a global variable. I do this on a map reduce i use that saves files to a folder with the name of that day/month. In my get input data i create the folder and set a script parameter to the folders id which i can then use in my map or reduce
For small amounts of data this works, not sure if you mean storing a whole search query which in case im not sure if that would fit in scrip param field
d
N/cache
?
244 Views