How can I use a script to set the variables?

I have a script to set a few variables and I need to run the script multiple times throughout the form, for different users at different times.  How can I configure the script as an object in the Variables and call it when I need to run it?  Appreciate all help.  I use SS3.

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;

To create a function to be able to reuse the code easily right click in your hierarchy (for example, on your "form1"), click "insert a Script object.

A new script object will be created, just rename it to something appropriate and then create a function both inside and

function myFunction(var1,var2,var3){
' just an example '
page1.textfield1.rawValue = var1 + var2 + var3
}

(I didn't fully understand the significance of the date and the event and the city, and exactly what your function is supposed to do, but it's how you declare a function).

To call this function you simply reference as form1.scriptobjectname.myFunction(123,"asdf",variablename)

(just one example of the possible arguments).

I hope that's not too hard to follow,

Best regards, Mattias

Tags: Adobe LiveCycle

Similar Questions

  • How can I write a script to set the maximum pixel dimensions?

    I need lots of JPGs and limit the maximum size of 500 px. This must apply to the largest side of the image, either in height or width. The other side should auto size proportionally. I currently have to make these changes to size manually. I have not found any scripting language or function which will allow me to set the size of larger pixel to 500 px, no matter what size is the most important.

    Example:

    1. If the image is 1000 w x 750 px: px, I want the script to resize the image proportionally to the largest side, change the width to 500 px

    2. If the image is 750 px x 1000 px h w, I want the script to change the height to 500 px and proportions are consistent for the width

    All ideas are welcome grately.

    Thank you

    Linda

    Create an action that use file - automate - Fit Image.

    I think that there may always be a bug that this should fix...

    Mage http://www.PS-scripts.com/BB/viewtopic.php?f=10&t=3370&p=15152&Hilit=Don%27t+Enlarge+fit+i & sid = ea73e8349aaf965015a4a351340e865d #p15152

  • How can I use SQL to check if the receipt is taken into account?

    Hi all:
    How can I use SQL to check if the reception of the AR is taken into account? Because there are so many recipes to check, I can not open to see the details one by one.

    My environment is: 11.5.9
    database: Oracle 9.2.0.8

    Terry,

    Run the script (11i: Oracle receivables data reception Data Collection Test [215969.1 ID]) and see if it helps.

    Thank you
    Hussein

  • How can I use my watch to snap the shutter on my iPhone?

    How can I use my watch to snap the shutter on my iPhone?

    Click here > https://help.apple.com/watch/

    Then click on: Remote Camera on the left.

    You'll see instructions.

  • How can I use my current windows7 for the new portable computer

    Original title:

    Windows 7

    Hello

    I bought the original windows7 and I currently use it in my laptop. I recently bought a new laptop and now I want this original windows 7 on my new laptop.

    How can I use my current windows7 for the new portable computer

    Please notify

    Concerning

    Run you where you are unable to activate code product. It gives you a list of phone numbers for Microsoft to ring.

  • How can I write a script to set left indent?

    In three cases as below:

    2044.jpg

    for example:

    Indent from left: 8 mm; first indent: 0 mm

    Indent from left: 0 mm; first indent: 8 mm

    Indent from left: 8 mm; first indent:-8 mm


    How can I write a script to tell Indesign, everywhere where text is, every time when I run the script once, the text can put just a step to the right, and 'a step = 8mm.

    Please, I beg you!

    Yes, it's exactly what I want, thanks Trevor, thank you very much!

  • How can I use a few icons on the personal bar

    I would like to see all my favorites... so, how can I use only the icons and not the text on my bookmarks bar?

  • How can I use webcam hp downloaded on the computer software laptop hp g6-1057er

    How can I use the downloaded hp (sp33544) computer webcam software hp laptop g6-1057er

    Click on the link

    FTP://ftp.Compaq.com/pub/SoftPaq/sp33501-34000/sp33544.exe

    Uninstall the old

    Reset

    install the new

  • How can I use my credit card of the United States in Israel to buy Creative Cloud?

    How can I use my US here in Israel credit card to buy Creative Cloud?

    Thanks for your advice.  It turns out that I contacted Adobe sales direct and at the moment they change my Adobe to an American account, one to match to match my credit card.

  • My mobile version of lightroom 30-day trial has expired, but I have Adobe Creative cloud with a full membership. How can I use lightroom for mobile in the future?

    My mobile version of lightroom 30-day trial has expired, but I have Adobe Creative cloud with a full membership. How can I use creative photography cloud adobe?

    Hello

    Please see: -.

    The use of Lightroom Mobile is included with Creative Cloud Student and Teacher Edition?

    Or

    Mobile Lightroom not available for education memberships | Kivuto

    You can also refer to the document:-Adobe Lightroom for mobile FAQ

    I hope that answers your query!

  • How can I use "Windows Anytime Upgrade" If the country where I live is not included in the list of countries where online purchase and download of the upgrade is prohibited?

    I understand that there is a list of the approved countries who are authorized to allow "sales online and downloads" of the software upgrade. However, if a Microsoft Customer happens to live elsewhere, how can it upgrade its computers?

    Windows Anytime Upgrade is no longer available, it is a product of the retail and retail sales and anytime upgrades to Windows 7 ended in October 2013 in all over the world.

    If you need to improve and the existing edition of Windows 7, you will need to purchase a retail package and use the product key for it with the Express Upgrade Assistant in the edition of Windows 7, you are upgrading. See the following to learn more about how it's done.

    http://www.notebooks.com/2009/10/26/Windows-7-anytime-upgrade-%E2%80%93-unlocking-more-benefits/

  • How can I use Windows 8 to adjust the size of my desk? He 'overflows' the screen about two inches around the perimeter.

    He 'overflows' the screen about two inches around the perimeter. Example: The clock in the bottom right is almost invisible.

    I don't need to change my resolution and cannot do with my monitor. Also, I don't speak of re-sizing the interface, not the wallpaper.
    What kills me is that I did this work before and he doesn't remember how!
    I have the latest drivers for my card AMD (helps nothing in the Catalyst Control Center) and the generic PnP monitor.
    How can I get instead of Windows 8 which allows me to adjust the size of the screen (no icon or text size and no resolution)? Am I crazy, or was it easy to find before?
    Thank you!

    Hello

    This looks like a problem of scale .

    Open the Catalyst Control Center.

    Expand the section My Flat-Panel digital .

    Select the item Properties (digital dish) .

    In the resizing of the Image section, place a check in the option enable GPU scaling .

    Select the image of the scale to the size of the full screen .

    Click Apply/OK.

    Test and let us know the results.

    Concerning

  • How can we use IF ELSE statement in the header Section

    Hi all

    I have obligation to indicate an address of invoice in the header section based on a special status, some body please share it is is it possible to use if elsewhere in the header section.


    Thanks in advance

    Thank you
    Pratap

    You can't place your if conditions inside the form fields in the header in Word. But you can directly type the tags in place.

    Concerning
    Charlotte

  • How can I remove one user other than the variable interface variable?

    Hello

    I'm currently treat a variable inside a Captivate 9 file corrupted. This variable is not used in the project. When I try to publish the project, I receive an error message indicating "Failure of compiling Swf". The variable name is "COUNT_INT_NEG". When I try to delete this unused variable, Captivate crashes every time. I can't even change the initial value without failure to Captivate.

    I'm looking for a method that is diverted to the removal of this variable.

    I found the answer to the problem of why some user variables caused my file to crash. It was not the name of the variable, it is the entrance to description. Soemhow, when the text for the variable description has been copied and pasted from a spreadhseet, some characters in the description were biased. Once I deleted the description, I was able to delete the variable.

    Problem solved.

    Thank you all!

  • How can I use a script in a Livecycle Designer form, to force the display of text in title case?

    Hello

    I'm a 'newbie' who's DIY'ing the construction of a dynamic form using Adobe Livecycle Designer 7 (I know it's a VERY old version!)

    [Thus, any aid that arrives must be "for Idiots"!]

    I need to build a code (Java script?) so some of my text fields DISPLAY data in the case of title - no matter how the user types in the data.

    Thus, for example, in a text field "address"...

    If someone types in...

    "sherborne 205 avenue.

    -OR-

    "205 Sherborne avenue"

    -OR-

    '205 SHERBORNE AVENUE'...

    I need the data to be DISPLAYED ESSENTIALLY as...

    "205 Sherborne Avenue".

    I found the following online and tried code in the event "output" of the field that I need to change (with 'language' chosen as JavaScript)...

    < this.rawValue = this.rawValue.replace (/ \b([a-z])/g, function (_, original) {return initial.toUpperCase () ;});})   >

    ... Was done to convert all the 'initial' words in uppercase letters - as LONG as they have not ALL typed in capital letters!

    Thus, this code has worked for the first two of my samples for Sherborne Avenue above - but it has NOT worked for the last...

    "205 AVENUE of SHERBORNE" does NOT get converted to title case - which is what I need help.

    Thanks in advance...

    I divided it in multimuple lines, but you could do without doubt in one if you wish

    var sometext = this.rawValue;

    someText = sometext.toLowerCase ();

    this.rawValue = sometext.replace (/ \b([a-z])/g, function (_, original) {return initial.toUpperCase () ;});})

Maybe you are looking for

  • Display problem on Satellite U400

    I have a problem with my laptop screen, the display on the screen begins vibrates up and down, any1 can tell me the reason behind it? Thank you

  • Bluetooth range

    I have a compatible bluetooth Satellite M60. I have the problem I have is that the mouse (Logitech V270) bluetooth stops working if I walk away he then of 7 to 10 centimeters to the right side of the laptop. When I bring it again to the Edith 7 to 10

  • Satellite A200 - need some XP drivers

    Hello I just installed Windows Xp on my Sat A200 and I installed all the drivers, but some how I can t detect drivers for Bluetooth, webcam, modem device on high definition audio bus USB controllers bus. Can someone help me... Thank you

  • Vista - Error Code: 646 (cannot install updates)

    I use Windows Vista Home Premium 32. I tried to update to Microsoft Office, updated security for Office 2007, Excel 2007 and Word 2007. The update fails all the time, I tried several times to update, no luck. Can anyone help with this?

  • Remove temporary files OK?

    I have more than 3000 files & folders in the path: Users\my name\local\temp Many files have a prefix of HP with a date in 2011.  Is it safe for me to delete these files?