Running Scripts

Hi,
I'm new to adobe, and I've been reading lots on this forum to get info on writing scripts in forms. I'm creating a form that has two pages, one for internal and one for our client.
I've written a couple things, and I was wondering what you do to run the script? I know in the sampler there is a button you push. Is there anyway to just get the calculations to automate?
For example, I need to do two things; 1. simple calculations within numeric fields and 2. Allow the text from one text field on the internal form to automatically enter itself in the text field on the external form (which I am stumped on).
a sample of one calculation I've written (in javascript) is below
var f = this.getfield("ProductSubtotal");
var g = this.getfield("Other");
var i = this.getfield("PercentDiscount");
event.value = (f.value + g.value)* (i.value/100)
It is supposed to create a product total from two numeric fields and add either a markup or discount. But when i switch to pdf preview it isn't working. (I've also tried saving the form and opening it in pdf).
Thanks a lot
Tiffany

Your script is very specific to forms created in Acrobat not LiveCycle Desinger. You should be aware that a field formatted as a percent displays 10.00% for 10 percent but has a value 0f 0.0010 in calculations.
For LiveCycle Designer you should be able to use the following FormCalc script to compute the amount of the discount assuming that the field "PercentDiscount" is the discount rate:
(ProductSubtotal + Other) * (PercentDiscount / 100)
To calculate the total you would need a FormCalc script like:
ProductSubtotal + Other + ( (ProductSubtotal + Other) * (PercentDiscount / 100) )

Similar Messages

  • HT4759 can sign into icloud but won`t let me in . says wont open because of long running script . any ideas

    Can sign into icloud but wont let me in . says wont open due to lond running script . any ideas thanks

    Restart your PC and try again.

  • Run Script action not working when verifying bundle

    I have a critical "Run Script" action in a bundle. When verifying the bundle, the script doesn't seem to run and the verify action hangs indefinitely.
    I see the following lines in the ZCM Log:
    Code:
    [DEBUG] [07/21/2011 19:05:48.670] [5880] [runscriptenf] [1] [TeachGH] [Run Script Action] [] [Found script engine cmd.exe. Not using it since cmd.exe does not take parameters.] [] []
    [DEBUG] [07/21/2011 19:05:58.311] [5880] [runscriptenf] [1] [TeachGH] [Run Script Action] [] [Run Script Action - Ended - 7:05:58 PM] [] []
    nothing else is logged after those 2 lines. It seems like ZCM decides not to run the script for some reason, but is still waiting for it to complete? Or is it possible that it has moved onto the next action, but it is hanging there and not reporting it to the log?
    I have no time to troubleshoot right now, will do so in depth tomorrow. Just wanted to get this posted in case anybody has a clue.

    Nevermind, the next action is running, and that is what is hanging, which I doubt is Zenworks fault... Time for some more troubleshooting.

  • "Run Scripts" giving a problem to create portal domain

    Hello All.
    I am new to weblogic portal development. Was trying to create my basic sample portal in weblogic_portal_10.3.4 with the help of documentation. I am getting in running scripts when I was creating the domain. I have followed the below steps, please help me if you find any issue with my steps.
    1. downloaded Weblogic_Portal_10.3.4 and installed in my windows 7 environment.
    2. launched eclipse for weblogic portal.
    3. opened portal prospective in eclipse.
    4. right click on server tab and selected "Oracle WebLogic Server 11gR1 (10.3.4)"
    5. opened "Domain Configuration Wizard"
    6. Selected "Create a new Weblogic domain" radio button.
    7. in the next screen for "Generate a domain configured automatically to support the following products"
    selected "Weblogic Portal 10.3.4" radio button
    8. in the next screen given the domain_name
    9. in the next screen provided the password/confirm-password for administrator user
    10. in the next screen selected JRocket SDK and development_mode for my domain.
    11. in the next screen just left all the default configuration for the datasources. ( non of the datasource is selected in their check boxes)
    12. in the next screen just clicked on "Next" button and "OK" on my popup
    13. in this screen "p13nDataSource" is selected on my left top window area, All 3 SQL Files are selected for loading database.
    Clicked on *"Run Scripts"*
    At this point i am getting an error saying : "CFGFWK-60839:  Database Load Failed!"
    java.lang.Exception: SQLException when executing file file:/C:/Oracle/Middleware/wlportal_10.3/p13n/db/derby/seq_drop_tables.sql
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:183)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1673)
    Caused by: java.sql.SQLNonTransientConnectionException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:272)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         ... 1 more
    Caused by: org.apache.derby.client.am.DisconnectException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
         at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:273)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1674)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:529)
         at java.net.Socket.connect(Socket.java:478)
         at java.net.Socket.<init>(Socket.java:375)
         at java.net.Socket.<init>(Socket.java:189)
         at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:206)
         at org.apache.derby.client.net.OpenSocketAction.run(Unknown Source)
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
         at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:272)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1673)
    CFGFWK-60839:  Database Load Failed!
    Please help me if you find any problem with the steps that I am following to create my weblogic_portal_domain.
    I was following the steps mentioned at : http://docs.oracle.com/cd/E15919_01/wlp.1032/e14252.pdf to create my domain to start portal development.

    Those are the WLP 10.3.2 instructions. But, the 10.3.4 instructions in the tutorial (http://docs.oracle.com/cd/E26806_01/wlp.1034/e14252/setup_dev_env.htm#i1014619) are wrong, too.
    In 10.3.4, with derby, Run Scripts doesn't work any longer; it should still work the other database (Oracle, SQL Server, etc.). Instead, for derby, just create the domain, accepting any warning dialogs about databases that come up. After that finishes, in the domain directory, run create_db.cmd (on windows) or create_db.sh (on *nix and Mac). It should create the derby database files in the domain, and include everything needed.
    I'll send a note to get the docs updated.
    Greg

  • HT1222 hi i have a apple imac 27 2009 and i have purchased mountain lion but near the end it says An error occurred while running scripts from the package "mzps6175750011235388779.pkg"

    hi i have a apple imac 27 2009 and i have purchased mountain lion but near the end it says An error occurred while running scripts from the package “mzps6175750011235388779.pkg”
    can you please advise me what should i do to fix this

    Some ideas.
    https://discussions.apple.com/message/20034600#20034600

  • Can't access icloud due to long running script

    keep getting this error message when logging on to icloud to access my email:
    can't access icloud due to long running script
    And if I do get logged into icloud and try to open the email application I can't open my email or any other applicationii.
    HELP

    Welcome to the Apple Community.
    Delete your mail account from Mail preferences and set it up again using the Mail Server Information.
    Some users have apparently encountered issues using this information in pre-Lion set ups (I haven't), Roger Wilmut has kindly provided instructions for those who find themselves with this problem.
    Entering iCloud email settings manually in Snow Leopard or Leopard
    Entering iCloud email settings manually in Tiger

  • Why does Firefox on my Windows 7 PC hang (become unresponsive) while it waits for most pages to load or run scripts?

    Firefox hangs (becomes unresponsive) when accessing many sites including Gmail. Eventually, when hung, Firefox will throw up a window saying "WARNING: A script has become unresponsive" or, in the case of Gmail, the page itself will say "Some Gmail features have failed to load due to an internet connectivity problem."
    IE8 and Google Chrome are working normally. I've tried Firefox in safe mode, re-installing and even running Firefox portable from a USB thumb drive. Each time with the same result—Firefox hangs or becomes unresponsive while it waits for most pages to load or run scripts.
    #### PC Workstation Environment ####
    Firefox 13.0.1
    Windows 7
    Symantec Endpoint Protection 11.0.6200.754
    --

    Your problem sounds like the one that a co-worker and I started to have about the same time. Check your Symantec client management control log. You might see a line like the following.
    Date and Time Severity Level Action Test / Production Description API Class Rule Caller Process ID Caller Process Parameter User
    2012-07-30 10:48:09 AM 15 Block Production Unauthorized NT call rejected by protection driver. System Built-in rule 1608 FlashplayerPlu FuncID-B6H, R... None
    At first we thought that it was a Javascript problem until we noticed this log. The key words are 'Block' and 'FlashPlayerPlu'. This problem recently started for us, perhaps with a software push 1-2 weeks ago. Internet Explorer does not hang when accessing pages with Flash.
    The Flash page does eventually load after a long time. However, since the whole browser hangs for a while, for the most part having the Flash plugin enabled makes Firefox unusable if accessing pages with Flash.
    Disabling the Flash plugin solves the hanging problem, but I do not know what is causing the problem, nor do I know when a combination of Windows 7, Flash, and Symantec will work. Your later version of Symantec shows that we might have the problem for a while, but I do not know what customization CSC did with Symantec. My coworker did run a complete virus scan, uncovering nothing. Another co-worker is running Windows XP. She does not have the problem, but I do not know what other versions of software she is running.
    Symantec Endpoint Protection version 11.0.6100.645
    Flash version 11.3.300.268
    Firefox version 14.0.1
    Windows 7 32-bit service pack 1

  • Script Alert "You should only run scripts from a trusted source."

    I created a small javascript which opens Photoshop and resizes some images.
    I want to be able to double-click the .JSX file from Windows Explorer, and have Photoshop execute the script. Likewise, I want to be able to run the .JSX file from the command line.
    The script runs perfectly. However, the problem is that I don't want any user interaction. I want to be able to run the script from the command line without the user having to click anything. What happens now when I try to run the file from Windows Explorer of the command line is, I get a Script Alert with the following text:
    You are about to run a script in Adobe Photoshop CS3. You should only run scripts from a trusted source. Do you want to run the script? Yes/No
    Is there any possible way to bypass this message or to answer in the affirmative?
    Thanks,
    Jamie L.

    Hi... Sorry to revive such an old thread,
        Does anyone know the "trusted source" folder for MAC CS4.
    EDIT!
    My bad.  "The /users/<user_name>/documents/Adobe Scripts" folder is working for this purpose for me.  I needed a path to it and forgot that the ~ resolves to the current user.  Sweet.
    -Bill

  • While running script adstpall.sh , addisctl.sh gives message.

    while running script adstpall.sh , addisctl.sh gives message that
    " OAD is stopped
    OSAGENT is stopped
    LOCATOR is stopped
    Unable to stop gatekeeper. No process id file found.
    session id 20136 is not running
    ......................................

    hi,
    The issue not with /usr/bin/local.  When you excute root.sh, it will try configure the ASM with New GRID HOME. Issue started, whent tried to start
    CRS-4123: Oracle High Availability Services has been started.
    ohasd is starting <<=================================================================
    acfsroot: ACFS-9320: Missing advmutil.
    Please let us know the below details
    ==> Acfs is configured the servers??
         ==>acfsutil registry
                   acfsutil info fs output.
    ==> With out ASM instance , How the database, CRS STarted ???
    ==> Please try stop and start the crs.
    ==> crsctl query crs activeversion output
    Regards
    Krishnan

  • Looking for an SQL query to retreive callvariables + ECC from a RUN SCRIPT RESULT (Translation to VRU)

    Hi Team,
    I am looking for an SQL query to check the data (ECC + CallVariable) received following a RUN SCRIPT RESULT when requesting an external VRU with a Translation Route to VRU with a "Run External Script".
    I believe the data are parsed between the Termination Call Detail + Termination Call Variable .
    If you already have such an SQL query I would very much appreciate to have it.
    Thank you and Regards
    Nick

    Omar,
    with all due respect, shortening a one day's interval might not be an option for a historical report ;-)
    I would recommend to take a look the following SQL query:
    DECLARE @dateFrom DATETIME, @dateTo DATETIME
    SET @dateFrom = '2014-01-24 00:00:00'
    SET @dateTo   = '2014-01-25 00:00:00'
    SELECT
    tcv.DateTime,
    tcd.RecoveryKey,
    tcd.RouterCallKeyDay,
    tcd.RouterCallKey,
    ecv.EnterpriseName AS [ECVEnterpriseName],
    tcv.ArrayIndex,
    tcv.ECCValue
    FROM Termination_Call_Variable tcv
    JOIN
    (SELECT RouterCallKeyDay,RouterCallKey,RecoveryKey FROM Termination_Call_Detail WHERE DateTime > @dateFrom AND DateTime < @dateTo) tcd
    ON tcv.TCDRecoveryKey = tcd.RecoveryKey
    LEFT OUTER JOIN Expanded_Call_Variable ecv ON tcv.ExpandedCallVariableID = ecv.ExpandedCallVariableID
    WHERE tcv.DateTime > @dateFrom AND tcv.DateTime < @dateTo
    With variables, you can parametrize your code (for instance, you could write SET @dateFrom = ? and let the calling application fill in the datetime value in for you).
    Plus joining two large tables with all rows like you did (TCD-TCV) is never a good option.
    Another aspect to consider: all ECC's are actually arrays (always), so it's not good to leave out the index value (tcv.ArrayIndex).
    G.

  • Has the behavior of 'run script' changed in Snow Leopard?

    These work fine:
    tell application "Safari"
    return URL of front document
    end tell
    tell application "Safari"
    set longURL to URL of front document
    return longURL
    end tell
    This does not:
    set getFrontmostURLCommand to "URL of front document"
    tell application "Safari"
    set longURL to run script getFrontmostURLCommand
    end tell
    return longURL
    Why? It looks like a script interpretation error but I can't figure out what's wrong.
    The error returned is:
    error "Safari got an error: Can’t get URL of document 1." number -1728 from "URL of front document"

    I see. Is there a way to make the application variable? I'm writing a function because getFrontmostURLCommand works with a couple of different browsers and I want it to be run conditionally based on the user's browser. Something like this:
    set defaultBrowser to GetDefaultWebBrowser()
    on GetDefaultWebBrowser()
    set _scpt to "export VERSIONERPERL_PREFER_32BIT=yes; " & -
    "perl -MMac::InternetConfig -le " & -
    "'print +(GetICHelper \"http\")[1]'"
    return do shell script _scpt
    end GetDefaultWebBrowser
    on defaultGetFrontmostURLCommand(defaultBrowserApplication)
    tell application defaultBrowserApplication to set longURL to URL of front document
    end defaultGetFrontmostURLCommand
    on caminoGetFrontmostURLCommand()
    tell application "Camino" to set longURL to URL of current tab of browser window 1
    end caminoGetFrontmostURLCommand
    if defaultBrowser is in {"Safari", "WebKit", "Opera"} then
    defaultGetFrontmostURLCommand(defaultBrowser)
    else if defaultBrowser is "Camino" then
    caminoGetFrontmostURLCommand()
    end if
    set the clipboard to longURL

  • Run scripts on a schedule

    Is the a way to run scripts on a schedule? I have a script that I want to run 3 days (Mon, Wed, Fri) a week at a certain time.
    How can I do this

    lets use iCal seeing as it came with your mac.
    create your script and save it where ever you want, open iCal create a new event, on the right hand side you will see the new events draw, set the time you want your script to activate in the from-to area, set it to repeat and end as you wish, go down to alarm and select open file in the drop down, then right below open file their should be another drop down select other from that, that will open a window now select your script, then in the next drop down select on date, your done.
    let me no if you need any more help.
    Budgie

  • Flash restricted running scripts or activeX controls

    Hey, can someone give me a hand?
    I read in a different, older forum, that said to use "<!--
    saved from url=(0014)about:internet -->" but how do i put it
    into my flash projects?
    If this is not what i should use then what should i use to
    remove the sign "flash restricted running scripts or activeX
    controls" that pops up when i run the flash on my website.

    I thought that only happened when running flash
    locally.

  • IE 11 Restricting Running Scripts and ActiveX Controls on Local Files

    I have been coding for my MediaWiki pages and needed to test these pages with IE 11. However, whenever I open a file in IE 11, an annoying message saying "IE 11 Restricted this website from running scripts and ActiveX controls." How do I do a
    one-time fix to stop this from happening in future to local files?

    to test your WEBSITE.... publish it to a web server. eg. localhost/test.local
    web servers and browsers use http(s), not the file: protocol.
    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to
    raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us
    Rob^_^

  • Running scripts in Aperture

    Aperture appears to have the facility to run scripts during the import stage (it's called 'Action' in the import pop up menu), but I'm having problems with it.
    I have successfully run the script below, and have exported the subsequent metadata to the master, which is my aim.
    But I cannot get the script run via this 'Actions' facility during import, even importing into a second library after the 'Object Name' field (called 'Title' by Aperture) has been created in the file and contains a 'space'.
    Can anyone show me what I am doing wrong?
    I found the script at: How can I set the Object Name to the file name on import?
    The post reads:
    AppleScript to the rescue!
    1. Copy the following text into Script Editor:
    tell application "Aperture"
    set selectedImages to the selection
    set tName to name of item 1 of selectedImages
    repeat with i from 1 to number of items in selectedImages
    set this_item to item i of selectedImages
    set tName to name of this_item
    set value of IPTC tag "ObjectName" of this_item to tName
    end repeat
    end tell
    2. Save the script in a sensible place, such as ~/Library/Scripts/Aperture Scripts so that it will turn up in the Script Menu (if it's enabled).
    3. Select a bunch of images in Aperture.
    4. IMPORTANT! You must use Batch Change to put a value into the Object Name tag (such as " "), until you do so the tag doesn't exist for those images and therefore cannot be altered.
    5. Run the AppleScript, it should loop through all the selected versions and put the version name into the Object Name tag.
    Note - the Master File Name isn't accessible via AppleScript, only the Version Name.
    Ian
    P.S. As with all such scripts, test it on a small number of 'spare' versions before doing anything drastic...
    Help!

    I haven't. Have you tried making a droplet to run at the end of the LR export?

  • Running scripts in different schema

    Assume you have a workspace user DEMO and parsing schema TEST and PROD.
    I create from Workshop/utilities/DDL you select schema PROD for getting DDL for tables, Triggers...
    Now you want to run this script against schema PROD (to create the Objects from PROD at TEST). But at Workshop/scripts you see the scripts owned by TEST, but you can't select a schema fur running the script.
    As workaround I edited the script: create table TEST.x instead of create table x, but I got: ORA-01031: insufficient privileges.
    If I go to Workshop/SQL_Commands select the schema TEST and put in the content of the script (create table TEST.x) it works.
    I confused as I create a DDL for y selecting TEST as schema and want run it as "create table PROD.y" - IT WORKS.
    In which context is a script executed ?
    The difference between schema TEST and PROD is that PROD was created with the workspace and TEST was added later (as new created schema).
    It looks like a bug?

    thank you scott, I understand. I assumed/found the "primary" schema (b) as the way as it worked. The default schema (a) I now tested - it works.
    That means per user there is only 1 schema assigned for running scripts (default or the first schema sssigned to workspace.
    But If I have a workspaced with assigned many schemata and some users, having there own default schema but accessing different schemata, there is no way to run a script at a specific schema.
    A workaround could by if a developer can change his default schema, but he can't
    ( I believe thats okay!).
    A developer sometimes has to create, upload,execute scripts ...
    For my example with schemata DEMO, PROD,TEST I hade to create 3 developers and relogin for executing scripts in the 3 different schemata.
    I think there is an enhancement request for having
    a) connect command in a script OR
    b) selecting schema as in object browser
    Thanks - hope you had merry christmas

Maybe you are looking for