I would like some help on creating the logic behind the the calculate action button for EFE.
I would like to calculate the total "yes" check boxes marked on a form and give it a total score. I take the name of the check box I created, create an action button to do the calculation using the name of the check boxes :
= DOCUMENT.TEMP_602633854_2815_34356719 + DOCUMENT.TEMP_602633855_2815_34356729+
It is not giving me any errors and is not displaying anything on the form.
What I have is not working. Any help will be appreciated.
{fn Count_Yes(){
local score = 0
for i = 1, i <= getnargs(), i = i + 1 do
if getarg(i) == "Yes" then score = score + 1 endif
endfor
return score
}}
{Document.total = Count_Yes(DOCUMENT.TEMP1,DOCUMENT.TEMP2,etc...)}
You wont even need an action button, just set a document variable to the name 'total' and it will update anytime one of the variables changes (yes, no, or made blank), just add all the variable names where I highlighted in red
Thank you so much! Now do I put this code in the Mel function definition? I am a newbie at this so sorry if that is a stupid question...
I have never used EFE, but in VFE we have a code panel off to the right for writing general functions and expressions, thats where it needs to go... you probably have an equivalent of that but I'm not sure what it looks like
That works awesome in the note, but I dont see how to connect it to a field on the form?
You can do a data display and write document.total for the connection
Thank you, that worked perfectly!!!!!!