Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Multiple Variable Scripting - Not sure how to write script in FormCalc or JavaScript - Using LiveCycle ES2

$
0
0

Good afternoon. I am designing a form, and am running into issues on how to create a concatenated field. I have multiple text fields for entering comments throughout the form (TextField1, TextField2, etc.). What I am trying to do is set up an additional calculated field that will display all of the comments listed elsewhere in the document.

 

Here is the rub - I want each of these to start on a new line, and I don't want a blank line if no comment was left.

 

I tried using variables (var), but don't know how to set them up to be conditional. What I tried was:

if (TextField1.isNull) then var a = "" else var b = /n + TextField1.rawValue

if (TextField2.isNull) then var b = "" else var b = /n + TextField2.rawValue

$.rawValue = Concat (a, b)

 

This is in FC because I am even worse with JS, but am willing to learn. Needless to say, there are many more than 2 TextFields - this is just a jumping off point, and I believe the script should work the same no matter the number of variables introduced. If there is anyone who could please lend a hand, I would greatly appreciate it.

 

Cheers,

Brock


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>