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.

Help with Performance Review form

Avatar

Level 1

Hello. I've research many hours and managed to piece together some working script for a Performance Review form. I'm using Live Cycle 11 and java script. if there is already an answer for this post please direct me to the URL. I understand scripting but don't use it enough to be proficient. So here we go....

1) the form consists of 12 categories - and each category has: a label, drop down, text and text field

2) The drop downs are identical rating choices numbered 0-5. i set 0= "(Choose One)"

3) If a user selects rating 2,3,or 4, the text field is optional

3) when a user selects 1 (unacceptable) or 5 (Excellent), the corresponding text field is set to mandatory with a message prompting for an explanation (i used the action builder for the message). in the script below "Relation" is the category - all drop downs have the same script syntax referencing the their category

     form1.AssociateReviewPage2.RelationRating::exit - (JavaScript, client)

     if (this.rawValue == "1")

     {RelationDescription.mandatory = "error";}

     else if (this.rawValue == "5")

     {RelationDescription.mandatory = "error";}

     else

     {RelationDescription.mandatory = "disabled";}

4) so far, so good - except that i could not get a mandatory message to pop up in the script and i don't get an error prompt that a required field is empty when i exit or save the form

For the next challenge:

1) I have a calculated-read only field i need to average the values of all 12 drop down categories to assign an overall rating to match values 1-5. i haven't been able to figure this one out.

1 Reply

Avatar

Level 1

Well, i figured out the second question, was straight forward. I just had to use the full path when referencing the objects. i.e. page1.field, page2.field etc. Then using the calculated average, display message describing the value range.

Still trying to figure out why the "error" value doesn't force the text field to be mandatory or required. the "error" value only highlights the field to be required.