Hello Everyone, Kindly help me with the issue!! ``...
# suitescript
n
Hello Everyone, Kindly help me with the issue!!
Copy code
amt_subsi3[cnt] = result.getValue({
				         name: "formulacurrency",
				         summary: "SUM",
				         formula: "CASE WHEN {subsidiary.internalid} = '7' THEN {amount} ELSE 0 END",
				         sort: search.Sort.ASC,
				         label: "abcd"
		      		});

                 amt_subsi1[cnt] = result.getValue({
				        name: "formulanumeric",
				         summary: "SUM",
				         formula: "CASE WHEN {subsidiary.internalid} = '6' THEN {amount} ELSE 0 END",
				         sort: search.Sort.ASC,
				         label: "wxyz"
		      		});
		      		
			
				//
                 

                  amt_subsi4[cnt] = result.getValue({
				           name: "formulanumeric",
					         summary: "SUM",
					         formula: "CASE WHEN {subsidiary.internalid} IN ('1','3','4','5') THEN {amount}  ELSE 0 END ",
					         sort: search.Sort.ASC,
					         label: "pqrs"
				      		});


                  amt_subsi2[cnt] = result.getValue({
				            name: "formulacurrency",
					         summary: "SUM",
					         formula: "CASE WHEN {subsidiary.internalid} = '8' THEN {amount} ELSE 0 END",
					         label: "xyzd"
				      		});
I’m getting the values like this to set on sublist of a Suitlet! But the values are not coming correct as it is copying values from one column to other column!! Kindly let me know how I can resolve it?? if you see the image there are 4 columns but 2 are copying other two which is not correct but the values are correct in saved search!!
b
formula columns are one of the places that Result.getValue(column) works better than Result.getValue(options)
use an actual column to get your value instead of the options representing a column
n
column option worked!! thanks @battk