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

How can I reuse a script to set variables?

$
0
0

I have a script to set some variables and I need to run the script many times throughout the form, for different users at different times.  How can I set up the script as an object in Variables and call it when I need to run it?  Greatly appreciate any help.  I'm using ES3.

 

var emailSubject = "";
var cleanDate = Page1.EventDetails.Block2.SpeakingDate.rawValue.replace(/[\/]/g, "-");
var eventName = Page1.EventDetails.Block1.EventName.rawValue;
var eventCity = Page1.EventDetails.USaddress.CityEvent.rawValue;
var eventState = Page1.EventDetails.USaddress.StateEvent.rawValue;
emailSubject = cleanDate + " - " + eventName + " - " + eventCity + " - " + eventState;

Viewing all articles
Browse latest Browse all 5571

Trending Articles



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