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

Conditional Execution

a213812
Registered: Dec 2 2010
Posts: 10

Hello everyone,
I am completely new to Adobe Acrobat and LiveCycle and really do need some help.
 
I have created a self assessment tool that asks individuals to rate their skill level on a scale of 1 - 3. At the end of each section I have calculated the average score based upon the answers submitted. So far so good. However, I would now like to display one of three passages of text depending upon the average score. Basically something along the lines of if the average score = or is less than 1 display text box 1, if the average score = or is less than 2 display text box 2, etc.
 
Could anyone give me some clues as to what I need to do or point me in the direction of a tutorial that might be of use?
 

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
It is covered in the 'Scripting Reference' under LiveCycle Designer's menu 'Help' option. In the index, look for 'If expressions, FormCalc', 'Equality Expressions, FormCalc', 'inequality expressions, formcalc', and 'relational expressions, formcalc'.

George Kaiser

DaveyB
Registered: Dec 10 2010
Posts: 70
There are two ways of doing this:

Using a script to write to a field, you could include user data in the text to "personalize" it.

Using hidden fields, you could have the non-personalized text ready to display

Given the fact that you are new to the process, I would suggest the latter approach. Basically, create 4 fields, identical in size, and position them all in the exact same place on the form. Field 0 is set to display, and is completely blank. Fields 1, 2 & 3 are populated with the desired text and are all hidden.Now you can access the field properties based on your average score, and make the relevant field visible. I wouldn't use the "= or is less than" (commonly written as <= ) scenario though, look up the syntax for a "case statement" and use that instead, to avoid having two or more fields displaying at the same time or even the wrong field!"if 'average' <= 3 " /// well, if 'average' = 1 then this is true so it will display the message intended for 3!!Hope that makes sense, if not, drop us a post back and we'll try to help!

DaveyB

LiveCycle Designer 8.0
"Genius is one percent inspiration, ninety-nine percent perspiration." ~~ Thomas Edison
"If at first you don't succeed, get a bigger hammer." ~~ Alan Lewis
"If the conventional doesn't work, try the unconventional" ~~ DaveyB

a213812
Registered: Dec 2 2010
Posts: 10
Thank you gkaiseril and DaveyB your responses. The information that you have very kindly provided has got me well on the way to completing my little project.