Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

FormCalc Help!

Avatar

Level 3

Hello and thank you for taking the time to read this.  I have quite a dilemma at hand.  I am trying to create a count calculation in a PDF form to grade random parts of a document that is used to critique a local gas station chain.  I recently discovered FormCalc and would love to get this idea working in my form.  The problem I am having is that I am CONFUSED at what I need to do to get this idea working... 

I will try to explain what I am looking to do, the best I can.  Here is a link: https://docs.google.com/open?id=0BztyzoA48bRCYWI4Njg1MTYtYTU5NC00OWU2LTgyNjAtYzA4YTMwNzczMjI0 to my google docs account since I do not know how to attach the PDF document.

What I am trying to do is create a "score" on what the stores are getting by counting the "yes" answers the questions.  The tricky part is that some of the questions are not part of the final score and each section (four total sections) are then divided by the number of questions are answered in each.  So for the "Customer Service" section, question one would not be "graded", but the other 10 would be.  I would then divide the number of "yes" responses by 10 and that would be the score.    When all of the sections are completed, I then want a total score for all four sections....  I am so lost with this is not even funny.  If someone could steer me in the right direction, I think I can get this going, but I just need a little helpful push. I know I need to do a "count" calculation, but what I would do....I do not know.


I am looking for anyone to help me tackle this headache as I do not want to use Excel for this... 


Thank you so much in advance.


Justin

9 Replies

Avatar

Level 7

Well the code you would use would depend on how the form was setup. Are the yes/no/na questions radio buttons, tick boxes, a table or what?

There is a count function in FormCalc - the easiest way to use it is if you setup each of the questions in a table and name each row the same thing (eg. Question). That way livecycle will name them Question[0], Question[1], etc. Then when you want to count say the answers in cell1 (which would be yes) you could just do Count(Question[*].cell1). You would put that calculation in the calculate event of the cell where you want the answer to be. If you didnt want question 1 to be counted in the score just name the row something else. To get the score rather than just the count you could do $ = Count(Question[*].cell1)/10.

Then to sum up all the scores you would put in the calculate event of the total score cell sum(score1 + score2 + score3 + score4) where 'score' is whatever you called your total cells.

Avatar

Level 3

Thank you for the reply.  What I am planning on doing is use a check box for the Yes, No, N/A responses.  I can see how this would set itself up, but where do I begin with FormCalc?  Like I originally said, I am confused beyond belief with this and the help file that is included with this is even more confusing.   I appreciate any help, or if you know of a book or website that explains FormCalc better, I would be more than willing to read that and try to understand how to complete this.


Thanks again,


Justin

Avatar

Level 10

Hi,

I have had a quick look at your form. At the moment you are using several objects to achieve what you want: subforms, text objects and checkboxes.

First off, if you only want a user to select a single option the best object to use is a Radio button exclusion group (with three radio buttons inside). The circular shape tells the user that it is mutually exclusive.

Have a look at the sample here: http://assure.ly/uiKS6f and a dropdown version here: http://assure.ly/iitzNJ. Both of these use JavaScript.

Hope that helps,

Niall

Avatar

Level 3

Thank you for the reply.  I like the look of the drop down menus, and I might use that idea.  I do not really care on the look as long as it gets the job done.  I guess my next question would be how to make the drop down menu and "score" area talk to one another.    I did warn you that I am completely new to this...  I was hoping to find a youtube video or how-to guide, but I have yet to find anything other than the forum for help.

From what I have seen, it looks as though I cannot use my existing form and will have to start over fresh...maybe I have that part confused.

Justin

Avatar

Level 3

Thanks for the reply.  I found that, but that is what originally confused me!   I think I getting a handle on this, but I have another question.  After I make the check boxes (I am trying a different route), what object do I have to use to get it to display the result? 

Thanks again for dealing with a noob!!!

Justin

Avatar

Level 10

Hi Justin,

No trouble!

First I would set out what you want to achieve. If it is to have the user make one selection from three options, then radio buttons are the best choice. This is because the user can see all three choices and the radio buttons are widely know as mutually exclusive. Dropdowns are also good, as they only allow one choice, and they are space efficient. But the user cannot see all of the choices.

Checkboxes are really meant where the user can select multiple options, which I dont think is what you are after here.

When you decide how the user will make their choice, it will be easier to give you a direction on the scripting involved.

In LC Designer there can be more than one way to solve a problem, so just take it in steps.

Niall

Avatar

Level 3

Thanks for getting back to me.  I agree with the comment on the Radio Buttons, but what I was given was the check marks, so thats what I went with.  I would prefer having all theree options visible, and think it will not be as confusion.

I have not had a chance to look at the form due to work, but I plan on looking tonight.  I want to thank you guys for the continued support as you are making this confusing process so much easier.


Thanks!


Justin

Avatar

Level 3

Now that the hectic Christmas season is over, I had some additional time to look this over.  I changed the check marks to radio buttons, but I am confused as to how to associate the radio buttons to each other so they are not able to all be "on" at the same time. 


I am looking forward to further understand how to perform the math so I can get this to work..

Thanks again!

Justin