it's ultimately a 'workaround' for the lack of fu...
# suitescript
s
it's ultimately a 'workaround' for the lack of function overloading in javascript i think. getValue does:
Copy code
function getValue(options)
               {
                   var name, join, summary, func;
                   if(!!options && !util.isString(options))
                   {
                       name = options.name;
                       join = options.join;
                       summary = options.summary;
	                   func = options.func || options['function'];
                   }
                   else
                   {
                       name = options;
                   }

                   if(options instanceof Column)
                   {
                       name = options;
                       join = undefined;
                       summary = undefined;
	                   func = undefined;
                   }

                    utilityFunctions.checkArgs([name], ['name'], 'Result.getValue');

                   return getCellAttribute(name, join != null ? join : null, summary != null ? summary : null, func != null ? func : null, 'value');
               }
👍 1