Scripting & Applying Set Percentage in Javascript

I need to script a set percentage to an existing calculated total field in order to show a new field total with the set percentage applied. Total is already calculated in the form, but I'm not sure how to plug in the 2.25% to calculate for a final total.
Example:
Total ____
Final Total ____ (new field with 2.25 percentage applied)

Robert,
Great – thanks! I did figure that out (eventually), but now have the issue of the Permit Fee field showing $0.26 when it should just show $0.00 until the Number field is filled in and the amount is calculated. Can you help? The error screen says that it doesn’t like the last equal sign. I’m at a loss…
TopmostSubform.Page1.Cell[10].Permit_Fee::calculate - (FormCalc, client)
Permit_Fee.rawValue = (4000.00Cell[8].Number + 0.25)1.0225
If(Number.isNull | Permit_Fee = “”)
Thanks!
Noemi Harvell

Similar Messages

  • Group Policy - Computer Startup Scripts - Add/Set Default printer

    Good Morning.
    Let's say we have 2 offices, A and B, and only 1 user.  The user is using Roaming Profiles.  Each office has its own printer.
    What I am trying to do, is make a Startup script that is specific to the COMPUTER being logged into so when any user logs into that computer, they get the printer in that office defined and set as default.
    I am able to do this successfully with my script but ONLY if i have the script be on the USER side of GP (i.e. in the Logon script section)
    That is great that that is working however, when my user goes to Office B, they still get mapped to Office A's printer if I use that method.
    So I figured I could just modify my GP and run the same script from the STARTUP section of the computer, rather than the LOGON section of the user.  It does not work.
    Here is my script:
    Set WRFCUNetwork = CreateObject("Wscript.Network")
    PrinterPath = "\\fileserver\MAINTELLER"
    PrinterDriver = "PrinterDriver"
    WRFCUNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
    WRFCUNetwork.SetDefaultPrinter "\\fileserver\MAINTELLER"
    This is where I Have the script placed:
         Computer Configuration -> Windows Settings -> Scripts(Startup/Shutdown)
    Once i'm in there, I double click Startup, click Add, and select my script which is named:
         MainPrinterSetup.vbs
    I have this GP applied to ONE OU, and that OU has ONE computer in it (my test computer)
    I login with a brand new user called "testuser" (creative, huh?) and basically nothing happens
    except they log in and have some Microsoft Document Image Writer printer set as default (which by the way sure does slow the PC down to the point of it almost being broke if anyone actually tries to print to that by accident)
    No Main Teller Printer, no anything.
    The strangest part about this is, if i apply this script to the user LOGON scripts, it works fine, the printer is there, and is set as default. (but see above why that wont work for my situation)
    So obviously the script works fine, but I guess i'm missing something when it comes to applying GP's to Computers rather than Users.
    Can anyone shed some light as to why the script is not running (i'm guessing the script isn't even attempting to run, rather than failing, but i have no way to know that)
    Thank you in advance!!
    Derek Conlon
    Network Administrator
    WRFCU
    EDIT:  Here are the PC's info that i'm working on:
         Server:  Windows Server 2003 Standard Edition (where my GP's are created and managed with AD)
         Target PC:  Windows XP Professional SP3
    EDIT #2:  I manually navigated to the Script file after logging in and "opened" it and it added and set the default printer no problem.  the issue is definately with the script running at startup.

    I wanted to clarify a few things:
    1. While it is true that printer connections are usually per user, it is definitely possible to create "global printers".  There are a number of ways to do this, but two methods that come to mind are using:
    a. "Rundll32 printui.dll,PrintUIEntry" option with the "/ga" switch.  The "/ga" switch is the key here since it allows you to deploy printers "per machine" instead of "per user".  More information
    about this is available at:
    http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm
    http://technet.microsoft.com/en-us/library/ee624057%28WS.10%29.aspx
    http://www.computerperformance.co.uk/Logon/logon_printer_computer.htm
    http://www.robvanderwoude.com/2kprintcontrol.php
    b. The Print Management console that is available in Windows 2003 R2 and higher can help you deploy printers "per machine" in addition to "per user".  More information about this is available at:
    http://www.czsolution.com/print-management/print-management/print-management-console.htm#DeployingPrintersByGroupPolicy
    http://technet.microsoft.com/en-us/library/cc753109%28WS.10%29.aspx
    2. As Guy mentioned, Group Policy Preferences can help set the default printer.  But there is another way to accomplish this.  The problem with the computer startup portion is that it runs before the user logs in.  And applying this script
    in the login script section would not work per computer unless you used loopback processing.  So another way to do this is to place a script that sets the default printer into the "All Users" startup folder.  Items in the "All Users"
    startup folder run for any user that logs into the computer, but it runs in the user's context.  So, this script would effectively set the default printer on a "per machine" basis.  The script method is a cruder way to approach the problem,
    but it will help get the job done.  Here are some resources on setting the default printer via script:
    http://www.intelliadmin.com/index.php/2007/08/set-default-printer-from-a-script
    http://www.computerperformance.co.uk/ezine/ezine17.htm

  • Setting shadow with Javascript

    For some odd reason, none of the Indesign's VBA-scripts works with InDesign CS5 anymore, maybe then reason is Office 2010 64-bit.
    Anyway, Javascript works just fine, but I'm having difficulties to write following script with JavaScript. Can anybody help?
    Simply script by setting up drop shadow for an active object.
    Set myInDesign = CreateObject("InDesign.Application")
    Set myObject = myInDesign.Selection.Item(1)
    myObject.transparencySettings.dropShadowSettings.angle=135
    myObject.transparencySettings.dropShadowSettings.opacity=33
    myObject.transparencySettings.dropShadowSettings.distance=1
    myObject.transparencySettings.dropShadowSettings.mode=2020623440
    myObject.transparencySettings.dropShadowSettings.blendMode=1852797549

    Hey!
    Here is the same code in JavaScript:
    var myObject = app.selection[0];
    with(myObject.transparencySettings.dropShadowSettings){
        angle = 135;
        opacity = 33;
        distance = 1;
        mode = ShadowMode.DROP;
        blendMode = BlendMode.NORMAL;
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • Setting styles with javascript

    getelementby('id').setAttribute lets you change a HTML objects attributes
    However the style attirubute (getelementby('id').setAttribute("style","value goes here")); actually contatins many settings in what javacript sees as a single attribute.
    as a result everytime i change a style setting with this i have to re-insert all of the other styles.
    this is inconvinient at best.
    and at worst means i have to store all of the set styles as javascript attributes and re-insert the whole lot.
    is there another way of doing this
    so that i can add or delete styles without the rest of the set styles being affected?

    function(){return A.apply(null,[this].concat($A(arguments)))}
    I_Know_Nothing_at_all wrote:
    I'm confused. Are you using the getElementby to write or set an individual style for multiple elements all over a page?
    I use it to set a style for an element or elements where the style is dependant on some other factor, or has to be changed in responce to an event.
    CSS alone cant do this because it does not have event listenters (except for psudo events such as :hover) cannot detect the styles and setting of anything (except for media rules) and does not have any sort of evaluative functions such as IFs, CASEs and basic arithmetic.

  • When I open a raw file (NEF Nikon 7100)  and apply setting then click save, I get an error ( could not complete your request because of a program error ). Ideas?

    when I open a raw file (NEF Nikon 7100)  and apply setting then click save, I get an error ( could not complete your request because of a program error ). Ideas?

    Oh, dear.
    If you use PSE as your external editor for iphoto, you need to save the images back to iphoto by using Save, not Save As and not changing anything like the name or format that would bring up the Save As window. (You may need to adjust the editor prefs>saving files>on first save to save over existing.)
    OR you can export the photos from iphoto to the desktop, use file>open in the editor and then change whatever you want and either import the saved image to the organizer or import it back to iphoto as a new file. What you are doing is extremely risky, particularly to the iphoto library which you may easily damage by your workflow.
    I would start the organizer holding down the shift key, then create a new catalog and switch to the new one. Then try opening the editor without opening an image and see if you get any farther.
    PSE and iphoto are not designed to be used as you've been doing. You are trying to write to the iphoto library from outside iphoto, which is the fastest known way to corrupt the library and lose all your photos.

  • How to create the Sap script & Layout Set (wants sample code)

    Hi All ,
    Can you please provide me the step by step procedure
    to create the Sap script & Layout Set .(please provide sample
    code/links /docs for layout & print program).
    Regards
    Rahul

    hi,
    go through the following links  what i found to create sap script.
    http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp
    http://abapliveinfo.blogspot.com/2008/01/free-sapscript-made-easy-46-book.html
    http://www.thespot4sap.com/articles/SAPscript_example_code.asp
    http://idocs.de/www3/cookbooks/sapscript/sapscript_1/docu.htm
    http://idocguru.com/www5/cookbooks/sapscript/sapscript_1/example.htm
    www.geocities.com/wardaguilar25/sapscript-tutorial.html
    http://logosworld.de/www3/cookbooks/sapscript/sapscript_8/docu.htm
    how to create a  scripts?give steps?
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=2969311
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=2902391
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=3205653
    https://forums.sdn.sap.com/click.jspa?searchID=1811669&messageID=3111402
    http://www.sap-img.com/sapscripts.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
    http://www.sap-basis-abap.com/sapabap01.htm
    http://www.sap-img.com/sapscripts.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
    http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
    Other Links

  • Script to set display name in iCS Calendar view to the LDAP CN

    Script to set the display name in the Calendar view for iPlanet Calendar
    Server(iCS) to the LDAP common name(CN)
    By default, iCS uses a user ID(uid) based on an employee number, rather than on
    an employee's first and last name, as the calendar ID(calid).
    The current release of iCS (5.0 P2) does not create a display name for a
    calendar when a user enables a calendar by logging in; by default, it will
    list the calid again in the Display Name field of the Calendar view.
    For example, if an employee has a calid of "12345," when you click the
    Calendar tab to view the calendar, the Display Name will appear as follows:
    <P>
    12345 (12345)
    <P>
    A problem arises when a user tries to subscribe to another user's calendar.
    Although the search criteria are based on the calid and the Display
    Name, the only information currently stored in the calendar database is the
    calid. Therefore, users will be unable to subscribe to another
    user's calendar unless they know the calid of that person. The next
    patch release for iCS will remedy this problem by using common names(CNs) as
    the Display Names. That is, the database will store the CN values
    from LDAP for users, and the Calendar view will appear something as follows:
    <P>
    12345 (John Doe)
    <P>
    Until this next release of iCS, there are two options to work around this
    problem.
    <P>
    <OL>
    <LI>You can "provision" users by running the cscal
    administrative utility with the
    Display Name option.
    <P>
    OR
    <P>
    <LI>If the user community already exists, you can use the sample Perl script
    below to search through the calendars of users.
    <P>
    Note: If a default calid exists that doesn't have a Display Name, the script
    will search the LDAP directory to find a CN to set as the Display Name for
    that calendar.
    </OL>
    <P>
    <HR>
    <P>
    <B>Sample Perl Script:</B>
    #!/bin/perl5.004
    sub TRUE {1}
    sub FALSE {"}
    $SIG{INT} = 'handler';
    $SIG{QUIT} = 'handler';
    $mypath = $ENV{'LD_LIBRARY_PATH'};
    $savepath = $mypath;
    $ENV{'LD_LIBRARY_PATH'} = $mypath.';.';
    #--------------INITIALIZATION----------------
    $host="ldaphost";
    $base_dn="ou=People,o=iplanet.com";
    $port=389;
    $auth_dn="cn=Directory Manager";
    $auth_pwd="password";
    $found_confile = TRUE;
    $default_cal = FALSE;
    open(CSCAL,"./cscal -v list |");
    while($cal_list = <CSCAL>)
    if ($cal_list =~ m/: owner=/)
    @calid = split(' ',$cal_list);
    chop($calid[0]);
    print "\ncalid: $calid[0] ... ";
    $default_cal = TRUE if ($calid[0] !~ m/:/);
    } elsif (($default_cal) && ($cal_list =~ m/^ name=([a-zA-Z ]*)/)) {
    chomp($1);
    print "cal name: $1";
    if (($1 EQ ") || ($1 EQ $calid[0]))
    open(LDAPSEA,"./ldapsearch -h $host -p $port -b \"$base_dn\" -D
    \"$auth_dn\" -w \"$auth_pwd\" uid=$calid[0] |");
    while($ldap_list = <LDAPSEA> )
    if ($ldap_list =~ m/^cn: ([a-zA-Z ]*)/)
    chomp($1);
    `./cscal -n "$1" modify $calid[0]`;
    print "The display name for $calid[0] is being modified to be: $1\n";
    sleep(1);
    close(LDAPSEA);
    $default_cal = FALSE;
    close(CSCAL);
    sub handler
    local($sig) = @_;
    print "... Caught a SIG$sig--closing down shop\n";
    close(CSCAL);
    close(LDAPSEA);
    exit(0);
    }

    anne wrote:
    Hi David,
    About your confuse about"case when 1=2 then "product_d"."name" else "calendar_d"."year" end".
    You can try in your locale.
    You will find they are different.
    BASED ON THAT you have two table product_d and calendar_d AND they are related by one Fact table.
    THEN When you type in
    "case when 1=2 then "product_d"."name" else "calendar_d"."year" end"
    AND
    "calendar_d"."year",
    IT WILL SHOW U TWO different RESULTS.
    I need to show year which its related product is not null. but I cannot use SHOW->SQL RESULTS->TYPE SOME "WHERE..." because I also need to use "constrain"..
    That why I choose to use a case when function..
    So, do you have any idea about this?
    Regards,
    AnneWhy not use two filters in your request? Have something like this:
    product_d.name IS NOT NULL
    AND
    calendar.year IS PROMPTED?
    ...instead of using a CASE statement? This way you can have both filters show the way they should in a meaningful way.

  • How to set percentage size for layout? for example : VBox,HBox,AnchorPane,.

    how to set percentage size for layout? for example : VBox,HBox,AnchorPane,......
    like HTML
    &lt;div width=&quot;640px&quot; height=&quot;480px&quot;&gt;
    &lt;div widht=&quot;50%&quot; height=&quot;60%&quot;/&gt;
    &lt;div widht=&quot;30%&quot; height=&quot;60%&quot;/&gt;
    &lt;div widht=&quot;20%&quot; height=&quot;60%&quot;/&gt;
    &lt;/div&gt;
    -----

    This is not supported. You can file a feature request at http://javafx-jira.kenai.com

  • How we do set resolutions in javascript to develope a game in unity 3d

    how we do set resolutions in javascript to develope a game in unity 3d

    If you're not talking about JS in PDF files, this is the wrong forum for
    your question.

  • Want a Script to set Computer extensionattribute in Bulk

    Want a Script to set Computer extensionattribute in Bulk by giving input from CSV Computer Name and extensionattribute.
    Regards,
    Kashi
    Kashi

    Hi Kashi,
    You can find pre-written scripts in the repository:
    http://gallery.technet.microsoft.com/scriptcenter
    If you can't find what you need, you can request a script here:
    http://gallery.technet.microsoft.com/scriptcenter/site/requests
    Let us know if you have any specific questions. This would be a pretty basic script, so you can use this requirement as a good excuse to learn how to get around in PowerShell. If you haven't had any exposure at all, you can check out the learning resources
    here:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Error in script to set album rating in iTunes

    Hi
    I used to use the following script to set album ratings of albums in my iTunes library.  It used to work fine, but now it's not working.  When I try to debug it I am getting the following error:
    "Scripting component error."
    on this line in the third block:
    repeat with R in (rating of tracks whose album is thisAlbum)
    I wonder if anyone can spot what the problem might be?
    Thanks,
    Nick
      --Make a list of all the selected albums:
              set theAlbums to {}
              set theAlbumsRef to a reference to theAlbums
              set tempList to album of selection
              set thePreviousTitle to ""
              repeat with thisTitle in tempList
                        set thisTitle to thisTitle as text
                        if thisTitle is not thePreviousTitle then
                                  copy thisTitle to the end of theAlbumsRef
                                  set thePreviousTitle to thisTitle
                        end if
              end repeat
              set numberOfAlbums to count theAlbums
      --Make a list containing one track for each selected album:
              set theTracks to {}
              set theTracksRef to a reference to theTracks
              repeat with thisAlbum in theAlbums
                        copy (track 1 whose album is thisAlbum) to the end of theTracksRef
              end repeat
      --Set the album rating of each album contained in the selection:
              set theRatings to ""
              set k to 0
              repeat with thisTrack in theTracks
                        set k to k + 1
                        if k mod 25 = 0 then beep 1 -- for audio feedback
                        set thisAlbum to item k of theAlbums
                        set numberOfTracks to 0
                        repeat with k from 1 to (disc count of thisTrack)
                                  try
                                            get (track count of track 1 whose (album is thisAlbum) and (disc number is k))
                                            set numberOfTracks to numberOfTracks + result
                                  end try
                        end repeat
                        set songRating to 0
                        repeat with R in (rating of tracks whose album is thisAlbum)
                                  if R > 80 then set R to 80
                                  set songRating to songRating + R
                        end repeat
                        set thisRating to round (songRating / numberOfTracks)
                        set album rating of thisTrack to thisRating
                        set theRatings to theRatings & (album artist of thisTrack & tab & thisAlbum & tab & (thisRating as text) & return)
              end repeat
              display dialog "The album “" & thisAlbum & "” has a rating of " & thisRating with icon 1 buttons {"OK"} default button 1
    end tell

    problems like this are usually solvable by splitting up the line.  It doesn't look like it, but there's a whole lot going on in that compound statement. try:
    tell application "iTunes"
              set ratingList to (rating of tracks whose album is thisAlbum)
              repeat with R in ratingList
                        if R > 80 then set R to 80
                        set songRating to songRating + R
              end repeat
    end tell

  • CC startup script to set Preference "Default Composer"?

    I have a startup script that I wrote for CS3 that controls about 20 preferences.
    One of the preferences was for Composer, which was by: app.textDefaults.composer = "Adobe Single-line Composer"
    This script has worked for CS 3, 5, 5.5, and 6 (we skipped 4)
    We're moving to CC and my script still works, but I see a new preference at Preferences > Advanced Type for "Default Composer"
    I get lost in ExtendScript's Object Model Viewer, so would someone be kind enough to tell me what to add to my startup script to set the Default Composer to Adobe Single-line Composer
    Thanks for your time
    Tom

    It seems to be related to app.textDefaults, but it seems to me that it's broken...

  • How do i set colors on javascript coding page, colors are not seen after installing Firefox version 8

    How do i set colors on javascript coding page, colors are not seen after installing Firefox version 8 . I am using WaveMaker application for web development

    Make sure that you allow pages to choose their colors and that you haven't enabled High Contrast in the Accessibility settings.
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    *http://kb.mozillazine.org/Website_colors_are_wrong
    *http://kb.mozillazine.org/Websites_look_wrong

  • Calculate retention according to a set percentage

    hi,
    What mean of retention?
    What the obverse in oracle handle the same functionality
    and i can Calculate retention according to a set percentage or a fixed amount while recording an invoice
    thanks

    Hi Umapathy,
    Yield and Scrap are user entry fields where you can have restriction on entered qty by changing  under delivery and over delivery to error through OPK4 config as shown below. Agree that any qty can be entered in any field (Yield or Scrap)
    OR
    You can define the operation scrap. Read the below doc for more details.
    http://scn.sap.com/docs/DOC-52834
    OR
    Another option is to use exit and write your logic based on input yield and loss.
    Thanks & Regards,
    Ramagiri

  • Create an Event log entry in Event Viewer in Windows 7, when processor exceeds a set percentage of usage

    Hi, I am trying to create an Event log entry in Event viewer in Windows 7 when the processor exceeds a set percentage of usage. I have unsuccessfully tried doing this through a Data Collection Set in the User Defined folder to monitor CPU usage
    and to trigger an Alert and log an entry when the CPU exceeds a set percentage of usage.  Any suggestions, and please if possible keep them simple and easy to follow, I am not to familar with Windows 7.  

    Hi, I am trying to create an Event log entry in Event viewer in Windows 7 when the processor exceeds a set percentage of usage. I have unsuccessfully tried doing this through a Data Collection Set in the User Defined folder to monitor CPU usage
    and to trigger an Alert and log an entry when the CPU exceeds a set percentage of usage.  Any suggestions, and please if possible keep them simple and easy to follow, I am not to familar with Windows 7.  

Maybe you are looking for