Hello, i'm sure this question has already been ask...
# suitescript
t
Hello, i'm sure this question has already been asked but i do not find the answer anymore. In a search, i have a column with a forumla (see code below): to get the value in the script, i'm using the column number like this:
fullResult[a].getValue(fullResult[a].columns[12])
Is there a better way to do that please ???
Copy code
search.createColumn({
         name: "formulatext",
         formula: "CASE when {custitem_bb_item_lens_reference.custrecord_bb_lm_lens_material} =  'Mineral' then 'Ultra-Light Mineral Lens'  when {custitem_bb_item_lens_reference.custrecord_bb_lm_lens_material} =  'Trivex' then 'PhD 2.0' when {custitem_bb_item_lens_reference.custrecord_bb_lm_lens_material} =  'PC' then 'Spirit Lens' else {custitem_bb_item_lens_reference.custrecord_bb_lm_lens_material}  end",
         label: "Lens material "
      }),