Anyone know/try using N/query as the data for the ...
# suitescript
d
Anyone know/try using N/query as the data for the getInputData entry point? If yes, what does the context.value look like in the map entry point?
e
@darrenhillconsulting Fairly simple Query where the module is aliased as
q
Results in this structure for each Result
So you get the Column metadata and the Column values, but sadly not using the Mapped Results structure
d
Thanks @erictgrubaugh. I'd imagine the multiple formula columns is still an issue too?
e
I don't think it would be
It's definitely not a problem in normal querying
In Workbooks you can specify an
alias
on your Columns, then call
asMappedResults
on the
ResultSet
. It will return an Array of Objects keyed by your alias. When you have multiple columns with the same ID (like formulas), then you must specify an
alias
Example of how it looks straight out my query cookbook. While it doesn't talk specifically about formulas, you can apply the same concept there. Unfortunately, the M/R doesn't seem to leverage this functionality, so you just have to know the order of your Columns as you're processing the results.