Hi all, I have 1 map reduce script with input dat...
# suitescript
s
Hi all, I have 1 map reduce script with input data is a saved search with > 100k results. I need to get the index of each result when running map stage (row number of search results) . Can someone please give me an idea?
b
s
@battk thanks but in this case, it is just record id
not exactly what I need
b
if you dont have strict sorting restrictions
you can probably add a numeric formula column which uses the ROWNUM
s
If you return a saved search from get input, the key should be the index
s
I tried rownum. It works pretty well in UI but in my code, it returns null
b
what does your code look like
s
thanks @Sandii but it returns record id idk how
I load this saved search and run, that's all. You can see my log
b
code
s
basically it looks like this
b
message has been deleted
you need to either share how to recreate the search you are using
or the easier make the search in code and use that instead
s
can I see your code?
b
its not any more interesting than yours
s
I move rownum to bottom and it works
thanks for your help