How do I apply this to each criterion?
I wrote the calculation field for each criterion. Separate criteria that print results as criterion4 criterion5.
Can you correct the exact code below? Should I apply it to others?
I don’t know what to select because the criteria fields are variable and the user will select them.
Thanks.
(function() {
var kriter4 = '';
var values = fieldname38|r,
n = values.length;
if(AND(IN('A', values), n == 1)) return 'Only A is selected';
if(AND(IN('B', values), n == 1)) return 'Only B is selected';
if(AND(IN('C', values), n == 1)) return 'Only A is selected';
if(AND(IN('D', values), n == 1)) return 'Only B is selected';
if(AND(IN('E', values), n == 1)) return 'Only A is selected';
if(AND(IN('F', values), n == 1)) return 'Only B is selected';
if(AND(IN('G', values), n == 1)) return 'Only A is selected';
if(AND(IN('H', values), n == 1)) return 'Only A is selected';
if(AND(IN('K', values), n == 1)) return 'Only B is selected';
if(AND(IN('L', values), n == 1)) return 'Only B is selected';
if(AND(IN('A', values), IN('B', values), IN('C', values), IN('D', values), IN('E', values), IN('F', values), IN('G', values), IN('H', values), IN('K', values), IN('L', values))) return 'A and B are selected';
if (fieldname38 === 'A') {
kriter4 = fieldname25 / 120;
} else {
kriter4 = 0;
}
jQuery('#calculation-kriter4').html(kriter4);
jQuery('.kriter4-aciklama').html('Konut Rayi? Bedeli : ');
jQuery('.kriter4-sonuc').html(FORMAT(PREC(kriter4, 2), {groupingsymbol: ".", decimalsymbol: ","}) + ' TL');
return [kriter4];
})();
or Do we need to add such an additional criterion?
(function(){
var values = fieldname38|r,
n = values.length;
if(AND(IN('A', values), n == 1)) return 'Only A is selected';
if(AND(IN('B', values), n == 1)) return 'Only B is selected';
if(AND(IN('C', values), n == 1)) return 'Only A is selected';
if(AND(IN('D', values), n == 1)) return 'Only B is selected';
if(AND(IN('E', values), n == 1)) return 'Only A is selected';
if(AND(IN('F', values), n == 1)) return 'Only B is selected';
if(AND(IN('G', values), n == 1)) return 'Only A is selected';
if(AND(IN('H', values), n == 1)) return 'Only A is selected';
if(AND(IN('K', values), n == 1)) return 'Only B is selected';
if(AND(IN('L', values), n == 1)) return 'Only B is selected';
if(AND(IN('A', values), IN('B', values), IN('C', values), IN('D', values), IN('E', values), IN('F', values), IN('G', values), IN('H', values), IN('K', values), IN('L', values))) return 'A and B are selected';
})()
-
This reply was modified 11 months, 1 week ago by pexel.
-
This reply was modified 11 months, 1 week ago by pexel.