Hi @hakyuz ,
You will have to get the Values from the Array “val”.
When you added the 6 references on the cellsetGet, they are all assigned to the array “val”, then you need to get the .Value to use, they will be in the same order as how you added in it, meaning the first, which starts from 0, is the BUD Min, the 1 is the BUD Max, 2 is the FCST Min, etc…
Note that on the “allowed_val_min” variable I have used “val[0].Value” to assign the value of the first result of the array to this variable (it starts from 0).
You can use this directly on your code or assign to variables to make it easier to identify, what you would need to do then is something like this:
First declare the variables in the beginning, using the “let”, before the return, then get each variable and assign the value from the array…
let allowed_val_bud_min;
let allowed_val_bud_max;
let allowed_val_fcst_min;
let allowed_val_fcst_max;
let allowed_val_rfct_min;
let allowed_val_rfct_max;
return this.$tm1Ui.cellsetGet([{ instance: 'SupplyFocus_SOP', cube: 'Demand Plan Limit Measure', cubeElements: ['BUD', 'Min Allowed'] }
, { instance: 'SupplyFocus_SOP', cube: 'Demand Plan Limit Measure', cubeElements: ['BUD', 'Max Allowed'] }
, { instance: 'SupplyFocus_SOP', cube: 'Demand Plan Limit Measure', cubeElements: ['FCST', 'Min Allowed'] }
, { instance: 'SupplyFocus_SOP', cube: 'Demand Plan Limit Measure', cubeElements: ['FCST', 'Max Allowed'] }
, { instance: 'SupplyFocus_SOP', cube: 'Demand Plan Limit Measure', cubeElements: ['RFCST', 'Min Allowed'] }
, { instance: 'SupplyFocus_SOP', cube: 'Demand Plan Limit Measure', cubeElements: ['RFCST', 'Max Allowed'] }]).then((val) => {
allowed_val_bud_min = val[0].Value
allowed_val_bud_max = val[1].Value
allowed_val_fcst_min = val[2].Value
allowed_val_fcst_max = val[3].Value
allowed_val_rfct_min = val[4].Value
allowed_val_rfct_max = val[5].Value
you can then use in a IF condition or however you need it.
Hope this helps! cheers!