I do not know how to approach an issue with my form, so any help or quide will be appreciate very much!
For a Performance Form I have 5 sections for the managers to fill in.
Every section includes an Assessment drop down list with 5 items to select from.
Items for DDList (Named:Assessment):
Outstanding
Exceeds Expectations
Meets Expectations
Needs Improvement
Does Not Meet Expectations
Final at the end of the form I have a section named
OVERALL SUMMARY OF PERFORMANCE with 5 check boxes named:
Outstanding
Exceeds Expectations
Meets Expectations
Needs Improvement
Does Not Meet Expectations
Is it possible with a script(Calculating the average?), AUTO to check(one of the check boxes for the Overall sum of performance?
THANK YOU
Views
Replies
Total Likes
Not sure I follow ....if the Manager picks a unique option for the 5 sections then what am I supposed to set on the Final? You could tally up the number of times the option was chosen and indicate that to the Manager but having the script check something automatically is doable as long as you have a set of rules to follow when there are ties.
Maybe I am misunderstanding your requirement.
Please elaborate.
Paul
Views
Replies
Total Likes
I am sorry if I am missunderstoond...
Managers have to pick one of the five items below for every section, I do not understand what you mean unique option :
Outstanding
Exceeds Expectations
Meets Expectations
Needs Improvement
Does Not Meet Expectations
Total we will have 5 Assessments, one for each section.
What about if items have an export value as:
Outstanding 5
Exceeds Expectations 4
Meets Expectations 3
Needs Improvement 2
Does Not Meet Expectations 1
For the Sum above divide by 5=Overall Performance.
For example If Overall Performance equal or larger than 3.5 the resualt is Exceeds Expectations
For example If Overall Performance is smaller than 3.5 the resualt is Needs Improvement
and so on....
Views
Replies
Total Likes
Now that is doable .....I will mock up an example this afternoon and post it back here
Paul
Views
Replies
Total Likes
Here is a quick sample I put together. The Total at the top is the running total of the scores that were awarded for each Question. That field woudl be hidden when you are finished. I left it visible to make it easier to see what was happening.
Paul
Views
Replies
Total Likes
Thanks Paul for you sample works great for my form!
I have apply your idea and script with some modifications for our needs. Thanks again.
There is One more thing to apply...
One of the sections for some employees is applicable and for some NOT.
For the Total marks I use the script:
Total.rawValue
=(AssesA.rawValue+AssesB.rawValue+AssesC.rawValue+AssesD.rawValue+AssesE.rawValue)/5;
If section 5 for the employee it is not applicable(NO VALUE) my script should be:
Total.rawValue
=(AssesA.rawValue+AssesB.rawValue+AssesC.rawValue+AssesD.rawValue)/4;
How I can accomplish this one?
May I send you my form to have abetter idea what I mean?
Thanks Paul
Views
Replies
Total Likes
You can simply do a test to see if NoValue is selected ..if it is then you execute one formula (the divide by 4) if it is not then you execute the other formula (the divide by 5). Make sense?
Paul
Views
Replies
Total Likes
Hi Paul, below is the script I am using for the Total Score but does not work!
AssesE is the section which does not apply(It is not applicable, so there is no value).
What I am doing wrong?
Thank you
form1.#subform[0].Total::calculate - (JavaScript, client)
if (AssesE.rawValue="")
{
Total.rawValue=(AssesA.rawValue+AssesB.rawValue+AssesC.rawValue+AssesD.rawValue)/4;
}
else
{
Total.rawValue=(AssesA.rawValue+AssesB.rawValue+AssesC.rawValue+AssesD.rawValue+AssesE.rawValue)/5;
}
Views
Replies
Total Likes
The logic of the script looks OK ...is there a space between the AssesD. and the rawValue? You can use the syntax checker in Designer to validate that your script syntax is OK (the book with the green checkmark on it next to the event selection). Once that check is done, you can lok at the Javascript console (only available through Acrobat) to see if your script is generating any errors (just hit Cntrl-J when the form is running - even in preview).
Paul
Views
Replies
Total Likes
Also, in the if statement you need a double "==" when testing equality.
Niall
Views
Replies
Total Likes
Hi Paul I am not getting any error and there is
not any space.
Hi Niall, here is my script with your suggestion but does not work.
form1.#subform[0].Total::calculate - (JavaScript, client)
if
(AssesE.rawValue=="")
{
Total.rawValue
=(AssesA.rawValue+AssesB.rawValue+AssesC.rawValue+AssesD.rawValue)/4;
}
else
{
Total.rawValue
=(AssesA.rawValue+AssesB.rawValue+AssesC.rawValue+AssesD.rawValue+AssesE.rawValue)/5;
}
Thank you all
Views
Replies
Total Likes
Then I will have to see it in action ...can you send me the form?
Paul
Views
Replies
Total Likes
What is AssesE? Is it a checkbox? If it is then it won't have a rawValue of "", it will either be "1" or "0". If AssessE is a numeric field or text field, try testing against null instead of "".
Niall
Views
Replies
Total Likes
Hi Paul, where I can send it?
Thanks
Views
Replies
Total Likes
Hi Niall,
AssesA, AssesB, AssesC, AssesE, AssesD are Drop Down Lists
with 5 Items and export values 1, 2 ,3 ,4, 5.
Thanks
Views
Replies
Total Likes
Yes, I would test against null.
Also maybe consider having a sixth option which has a blank display value. That way if the user selects an option from the dropdown and then changes their mind, they can select the blank, effectively clearing the dropdown. If you do this, you would need to test against null and the bound value of the blank.
Something like:
if (AssessE.rawValue == null || AssessE.rawValue == "6")
{
// don't include E in the calculation
}
else
{
// do include E in the calculation
}
Good luck,
Niall
Views
Replies
Total Likes
Hi Niall, here is my script after your
suggestions:
form1.#subform[0].Total::calculate - (JavaScript, client)
if
(AssesE.rawValue == null || AssesE.rawValue == "6")
{
Total.rawValue
=(AssesA.rawValue+AssesB.rawValue+AssesC.rawValue+AssesD.rawValue)/4;
}
else
{
Total.rawValue
=(AssesA.rawValue+AssesB.rawValue+AssesC.rawValue+AssesD.rawValue+AssesE.rawValue)/5;
}
Still does not work....
For example if I select items A(Export value 5 each) for all DDL (5+5+5+5+5)/5 gives me 11.111!
The correct culculation is (5+5+5+5+5)/5=5
Thank again
Views
Replies
Total Likes
Hi,
I think the issue is that the calculation script does not recognise the dropdown.rawValue as a number.
In this example: https://acrobat.com/#d=wRD6IJRHL5VGUCmv8AtFpw I have included the Number() to set the data type of the dropdowns.
Hope that helps,
Niall
Views
Replies
Total Likes
That was the solution: Number() !!!!
THANK YOU Niall, THANK YOU Paul for all your help in this matter!
THANK YOU!
Views
Replies
Total Likes
Hi Niall,here again with the same project but with a different aspect.
Is it possible for your example(Score from dropDown) to add 5 NumericFields as below to calculate separate the score for Outstanding,
the score for Exceeds Expectations and so on.....:
OUTSTANDING SCORE,
EXCEEDS EXPECTATIONS SCORE
MEETS EXPECTATIONS SCORE
NEEDS IMPROVEMENTSCORE
DOES NOT MEET EXPECTATIONS SCORE
Thank you Niall
Views
Replies
Total Likes
Hi,
As you have described it, I would be inclined to have a numeric field associated with each dropdown and then give each field the same name as the dropdown and set the binding to 'global' (see Object > Binding palette).
Here is an updated sample: https://acrobat.com/#d=wRD6IJRHL5VGUCmv8AtFpw
This works because the dropdowns have specified values (now 5 to 0). While the dropdown will display the 'display value', the numeric field will show the dropdown's rawValue (eg a number).
Hope that helps,
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies