These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calcu scripting multiple scores

ericesh
Registered: Jan 27 2010
Posts: 6

I am using one page to score 5 criterion of a job application, however some application will have a 6th criterion. I did easily script the 5 to add for a total and simple put the 6th as a text field but now need to make it score, so if the 6th applied then the value of each criterion willl shift to 16.67 instead of the 20 points. Does anyone have scripting suggestions? or other remedies.

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
It's unclear to me, what exactly your're doing in your form and what you want to do.
Can you provide a your current scriptings?
Do you use checkboxes or numeric fields ...?
Please give us more input.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

ericesh
Registered: Jan 27 2010
Posts: 6
RAautoScore = Answer1 + Answer2 + Answer3 + Answer4 + Answer5 + Answer6 + Answer80 + Answer90

But for some application I need to score Answer70

How can this be an if then etc.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
I assume, that AnswerX is a numeric field, where you type in a value.
So you can use an if expression to check, if Answer70 is not empty (null).
If so, the calculation uses the value of Answer70 too.

if (Answer70 ne null) thenRAautoScore = Sum(Answer1, Answer2, Answer3, Answer4, Answer5, Answer6, Answer70, Answer80, Answer90)elseRAautoScore = Sum(Answer1, Answer2, Answer3, Answer4, Answer5, Answer6, Answer80, Answer90)endif

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

ericesh
Registered: Jan 27 2010
Posts: 6
Thanks I will try this and see if it works, I thought it would be easy*** The problem I have is that I need if there is a null for the vaules to change to a different value as well for example, Answer8 is 1.66 in one value but if Answer70 is selected then it will change to a 1.32
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Well, I need to know, how do you calculate you current values.
Do you refer all values to a maximum amount X (that is equivalent to 100%) ?

Example:
If X is 10.0 and you have 5 values, each value will be have a weighting of 2.0 (20%).
If there are 25 value, each value weighting will be 0.4 (4%) and so on.

You can create calculation scripts that check every answer field for a value.
For every answer field that is filled, you can raise a variable that you use as divider in your calculation.

The basic calculation for each value will be looking this way.
var X = 10.0 ; My maximum amount$ = X / MyDivider

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

ericesh
Registered: Jan 27 2010
Posts: 6
The total of the sheet is 10
questions 1-4 each have a value of 4/10 = 2.5 each question has 4 options at 2.5 = .625 the max total would be 10

However, now the boss wants a 5 question that would be applicable only to some others it would be the null you talked about.

questions 5/10 = 2 each question then would be that are valued at 2/4 = .5 also it would be 10 if each scores max on the 5 questions.

Thanks for all your suggestions.