javier94
Member
i'm usign jomla 3.8.3 and fabrik 3.8
i have a form named CAT-curriculum-administracio
and 3 repeteable groups in this form.. named
cat-curriculum-administracio-annex-1-dades
cat-curriculum-administracio-annex-2-dades
cat-curriculum-administracio-annex-3 dades
in each group there is one element named " percentage prova % " is a dropdown with values from 0-95
i would like to sum this 3 elements if are not repeteable or "X" if are repeteable and the result show in the element "% confirmacio percentage (1)"
show in group
cat-curriculum-administracio-valoracio-proves
and in the total SUM element should be a conditional like this :
if "yes" the sum of all the non possible repeteable groups the number is = 100 .. show
"100 % is correct "
If "not" the sum of all the non possible repeteable groups the number is <100 or >100.. show
" 95% or 105% is not correct. check again"
for the sum of all repeteable groups i have use..
i have seen in other post.. this code.. and i used.. but doesn?t work .. the sum is not correct.
in the calcul box
return array_sum($data['cat_curriculum_administraci_135_repeat___percentatge_prova_Annex_1_raw'])
+ array_sum($data['cat_curriculum_administraci_138_repeat___percentatge_prova_Annex_2_raw'])
+ array_sum($data['cat_curriculum_administraci_140_repeat___percentatge_prova_Annex_3_raw']);
in the ajax revision
{cat_curriculum_administraci_135_repeat___percentatge_prova_Annex_1},
{cat_curriculum_administraci_138_repeat___percentatge_prova_Annex_2},
{cat_curriculum_administraci_140_repeat___percentatge_prova_Annex_3}
and i have found other conditional code like this..
calcul box
if {(cat_curriculum_administraci_135_repeat___percentatge_prova_Annex_1_raw) +
(cat_curriculum_administraci_138_repeat___percentatge_prova_Annex_2_raw) +
(cat_curriculum_administraci_140_repeat___percentatge_prova_Annex_3_raw)=100}{return 'Perfecte 100% percentatge';
}
else{
return'Percentatge NO es correcte'
}
in the ajax box
{cat_curriculum_administraci_135_repeat___percentatge_prova_Annex_1},
{cat_curriculum_administraci_138_repeat___percentatge_prova_Annex_2},
{cat_curriculum_administraci_140_repeat___percentatge_prova_Annex_3}
i think is a mix between both codes.. because i think the second code doesn?t work because for SUM
non repeteable groups.. you must use in fabrik 3 array function..
i would like see the calculation when you change any value before to save if is posible.
if you can tell me which code will works.. will be perfect
thanks
javier...
i have a form named CAT-curriculum-administracio
and 3 repeteable groups in this form.. named
cat-curriculum-administracio-annex-1-dades
cat-curriculum-administracio-annex-2-dades
cat-curriculum-administracio-annex-3 dades
in each group there is one element named " percentage prova % " is a dropdown with values from 0-95
i would like to sum this 3 elements if are not repeteable or "X" if are repeteable and the result show in the element "% confirmacio percentage (1)"
show in group
cat-curriculum-administracio-valoracio-proves
and in the total SUM element should be a conditional like this :
if "yes" the sum of all the non possible repeteable groups the number is = 100 .. show
"100 % is correct "
If "not" the sum of all the non possible repeteable groups the number is <100 or >100.. show
" 95% or 105% is not correct. check again"
for the sum of all repeteable groups i have use..
i have seen in other post.. this code.. and i used.. but doesn?t work .. the sum is not correct.
in the calcul box
return array_sum($data['cat_curriculum_administraci_135_repeat___percentatge_prova_Annex_1_raw'])
+ array_sum($data['cat_curriculum_administraci_138_repeat___percentatge_prova_Annex_2_raw'])
+ array_sum($data['cat_curriculum_administraci_140_repeat___percentatge_prova_Annex_3_raw']);
in the ajax revision
{cat_curriculum_administraci_135_repeat___percentatge_prova_Annex_1},
{cat_curriculum_administraci_138_repeat___percentatge_prova_Annex_2},
{cat_curriculum_administraci_140_repeat___percentatge_prova_Annex_3}
and i have found other conditional code like this..
calcul box
if {(cat_curriculum_administraci_135_repeat___percentatge_prova_Annex_1_raw) +
(cat_curriculum_administraci_138_repeat___percentatge_prova_Annex_2_raw) +
(cat_curriculum_administraci_140_repeat___percentatge_prova_Annex_3_raw)=100}{return 'Perfecte 100% percentatge';
}
else{
return'Percentatge NO es correcte'
}
in the ajax box
{cat_curriculum_administraci_135_repeat___percentatge_prova_Annex_1},
{cat_curriculum_administraci_138_repeat___percentatge_prova_Annex_2},
{cat_curriculum_administraci_140_repeat___percentatge_prova_Annex_3}
i think is a mix between both codes.. because i think the second code doesn?t work because for SUM
non repeteable groups.. you must use in fabrik 3 array function..
i would like see the calculation when you change any value before to save if is posible.
if you can tell me which code will works.. will be perfect
thanks
javier...
Last edited: