Simple script again

Hi,
now I am trying to allocate yearly budget to months but proportionally to the fact data.
my script is:
FIX (FY07,Targ,Rev,"110")
Budget07=
@ALLOCATE ( Budget07->YearTotal,@LEVMBRS(YearTotal,0),Fact04,,share);
ENDFIX
but it DOES NOT calculate anything
Fact04 has 2 for each month, so the result must be the same as for the even allocation.
thanks in advance,
Andrei

You are most likely not properly pointing to the intersection where the 2 is loaded. You are stating in the function Fact04 but give no other relative reference so it operates with the context of your fix statement.
What is the exact intersection where the 2 is loaded to?
By the way, why do you have a scenario called Budget07 when you have a year dimension that specifies FY07? Generally it would make more sense to just call the Scenario Budget and then be able to reuse it each year.

Similar Messages

  • Error while executing a simple script....

    Hi,
    I am trying to run the following simple script in Oracle 8i:
    UPDATE
    vcad_ocorrencias
    set tipo_situa_solic = 'E', desc_obs_atendente = 'ACERTO DE BASE -
    18/10/2004'
    where cod_solicitacao = 7
    and tipo_situa_solic in ('N', 'P')
    and cod_contrato_Inter not in ( 2247,2295,2296,2297,2278,2269,2168)
    and dthora_geracao < '07/10/2004'
    order by cod_contrato_inter;
    And it is returning the following message error:
    ERRO na linha 8:
    ORA-00933: SQL command not properly ended
    Well this script was made by a developer and now I have to run it in production environment...
    Does someone know why it is failing?

    Get rid of your 'order by statement'.
    order by cod_contrato_inter;
    Also make certain that the 'NLS_DATE_FORMAT' is set to 'DD/MM/YYYY' or change
    and dthora_geracao < '07/10/2004'
    to
    and dthora_geracao < to_date('07/10/2004','DD/MM/YYYY')
    UPDATE
    vcad_ocorrencias
    set tipo_situa_solic = 'E',
    desc_obs_atendente = 'ACERTO DE BASE - 18/10/2004' -- not sure if it is a date column
    where cod_solicitacao = 7
    and tipo_situa_solic in ('N', 'P')
    and cod_contrato_Inter not in ( 2247,2295,2296,2297,2278,2269,2168)
    and dthora_geracao < to_date('07/10/2004','DD/MM/YYYY')

  • Could someone please sketch out this simple script for me?

    Could someone please sketch out a simple java script for me. I will have a document with one background
    layer and a layer set (group) called "Analyze" that consists of 63 adjustment layers. The layer names in that "Analyze" group(folder) will be
    "01" ...through "63" with 01 on the bottom and 63 at the top. Initially, all of the adjustment layers will be invisible and  the
    group will be closed (not expanded). I need a simple  script that will check for the first invisible layer in that group
    and make it visible without selecting that layer nor expanding the group. The script has to check
    for the first invisible layer every time it runs because other actions may have turned off a layer in the set.
    The point of this is so I can hotkey flipping on the layers one at a time without expanding the set or
    changing focus off the  background. It seems it should be a simple loop, but I just can't wrap  my head
    around all the objects (e.g. Layer as opposed to Layers  and  Artlayer as opposed to Artlayers)
    and the constants constants.
    for (i = 63; i>0; i--){                 /* I have found layer indexes 0 are the topmost layer */
      if( layerset[i] == INVISIBLE){
               layerset[i] = VISIBLE;
                  break;
    Could someone please write me a simple script that would do this?
    Edit I found this and its very close to what I need:
    var doc = app.activeDocument;
    for(var i = 0 ; i < doc.layers.length;i++){
      doc.layers[i].visible = (i % 2 == 0);
    From here : Function to show/hide layer with Photoshop script (JSX) - Stack Overflow
    In my case I would rewrite it to this
    for(var i = 62; i >=0; i--){
         if(  !doc.layers[i].visible){
              doc.layers[i].visible =TRUE;
              break;
    My problem is I just need  to traverse the layers in my layerset "Analyze"
    How do  I reference just those? Is there a doc.layersets["Analyze"].layers[i].visible = TRUE?
    Message was edited by: Shawn Laughlin To add more information

    Well this works:
    var doc = app.activeDocument;
    var analyze = doc.layerSets.getByName("Analyze").layers
    for(var i = 62 ; i >= 0; i --){
        if (!analyze[i].visible){
            analyze[i].visible =1;
            break;
    Hard to believe TRUE is not a constant in java.

  • Simple Script works on 10.6 but not 10.5.8

    Hi,
    Brand new to Applescript...I made a simple script (saved as an application) to rename Excel Sheet Tabs and it works on my MBP (10.6.2) however when I try sharing with other users (10.5.8), it fails to carry out properly. It opens a blank workbook rather than the "test.xls" workbook and won't go any further. Am thinking it might be due to:
    1) where the script and .xls file were originally created/saved?
    2) 10.6.2 vs. 10.5.8?
    3) method of sharing? Tried attaching to Mac OSX Server Wiki, NAS and e-mailing but still wouldn't work.
    here's the script-
    tell application "Microsoft Excel"
    try
    open workbook workbook file name "test.xls"
    activate object worksheet "names"
    set myRange to range "A2" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 3 to myName
    set myRange to range "A3" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 4 to myName
    set myRange to range "A4" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 5 to myName
    set myRange to range "A5" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 6 to myName
    set myRange to range "A6" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 7 to myName
    set myRange to range "A7" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 8 to myName
    set myRange to range "A8" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 9 to myName
    set myRange to range "A9" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 10 to myName
    set myRange to range "A10" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 11 to myName
    set myRange to range "A11" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 12 to myName
    end try
    end tell
    Any suggestions will be greatly appreciated! THANKS!

    more info:
    a co-worker with a MacBook (10.5.8) was able to download the script and .xls file from our server and it worked...
    An eMac (10.4.11) was not able to run the script.
    All machines are running 2008 Office for Mac

  • HOW TO : Writing simple scripts in SQL Developer??

    Here is a simple script I run in SQL*Plus...
    the first SQL prints the QCSID, the second script prompts for a SID which is the QCSID from the first SQL... once provided it gives me the output I want...
    I just cannot do this in SQL DEVELOPER..... or Can I?
    select distinct qcsid from v$px_session;
    select sid,serial#,qcsid,qcserial#,degree,req_degree from v$px_session
    where qcsid in (select qcsid from v$px_session where sid='&sid');

    Ganesh,
    Simple substitution and defines work in SQL Developer scripts.
    I think the problem with running your script is that the first query results are not displayed before the window asking for the '&sid' value. That is the output to the 'screen output' tab is buffered and not synchronized with additional pop up (or dialog) windows. Is that correct?
    Currently:
    You can use substitution variables in the f5 'Run Script' but no bind variables.
    You can use bind variables in the f9 'Execute Statement' but no substitution statements.
    You can use anonymous PLSQL blocks, and packaged functions and procedures, so you can store per session state in PLSQL packages.
    -Turloch

  • I need a simple script (Break Link To Style)

    Hi nice guys,
    Can someone please provide a simple script that will break the links to styles in all the paragraphs in a document.
    Thanks in advance
    Maria*
    *An non coder designer that simply is not capable of understanding javascript... (but I have tried!)

    Hi Maria,
    Jongware's post (http://forums.adobe.com/message/1890625#1890625) gave me a clue on how to do this.
    Give this a try:
    var i, j, myDoc = app.activeDocument,
              allStories = myDoc.stories,
              thisStory,
              thisPara;
    for (i = 1; i < allStories.length; i++) {
              thisStory = allStories[i];
              for (j = thisStory.paragraphs.length - 1; j >= 0; j--) {
                        thisPara = thisStory.paragraphs[j];
                        thisPara.applyParagraphStyle(myDoc.paragraphStyles[0], false)
    alert ("Job Done!");

  • Simple script in /usr/local/bin just won't start - SOLVED

    I put this really simple script for starting psi into my /usr/local/bin, set it a+xr and added /usr/local/bin to my path. However, I just can't start the damn thing.
    Here's the script itself (I really don't think there's something wrong with it, since if I type it in the shell it works fine):
    #!/bin/zsh/
    #start psi, never stop
    while true;
    do psi;
    done
    Here's my users $PATH:
    ─$ print $PATH
    /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/usr/local/bin:/opt/kde/bin:/opt/mozilla/bin:/opt/qt/bin
    Here's the permissions of the script:
    $ ls -lah /usr/local/bin
    total 4.0K
    drwxr-xr-x 2 root root 80 Dec 15 03:52 ./
    drwxr-xr-x 10 root root 240 Dec 10 18:55 ../
    -rwxrwxr-x 1 kamagurka users 60 Dec 15 03:51 psi.start*
    And here's what happens when I try to execute it:
    $ psi.start
    zsh: command not found: psi.start
    So, I'm either missing something incredibly obvious, or something freaky's going on here. I hope it's the former.
    EDIT: I had no idea where to put this, so I put it into Desktop Env since I'm trying to start a graphical app, but feel free to move it.
    EDIT: Yea, I was being a little dense.

    smoon wrote:Not sure if that's the problem, but try removing the trailing / (slash) from your script's shebang.
    See, something really obvious. Stupid, even. You can see, I don't do a lot of scripting.

  • Deleting characters in a simple script

    I have a simple script where I use a paragraph return and a % to indicate which lines I want to convert to a certain Applied Paragraph style. I'd like to remove the paragraph style and % adterwards. Here is the relevant part of my script so far (it contains A LOT of other find and replace functions:
    //Set the find options.
    app.findChangeTextOptions.caseSensitive = true;
    app.findChangeTextOptions.includeFootnotes = true;
    app.findChangeTextOptions.includeHiddenLayers = true;
    app.findChangeTextOptions.includeLockedLayersForFind = true;
    app.findChangeTextOptions.includeLockedStoriesForFind = true;
    app.findChangeTextOptions.includeMasterPages = true;
    app.findChangeTextOptions.wholeWord = false;
    //Header Paragraph Style
    app.findTextPreferences.findWhat = "^p%";
    app.changeTextPreferences.appliedParagraphStyle = "Character Header";
    app.documents.item(0).changeText();
    //Remove %
    app.findTextPreferences.findWhat = "^p%";
    app.changeTextPreferences.changeTo = ;
    app.documents.item(0).changeText();
    //Clear the find/change preferences after the search.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    I don't know what character to use at the end of this line (app.changeTextPreferences.changeTo =) to indicate that I don't want to replace ^p% with anything, just remove it.

    Try this:
    app.changeTextPreferences.changeTo = "";

  • Simple scripting question

    OK, so I'm fairly sure this is a simple scripting issue, but I just cannot get my head around the scripting language.
    I am working on a DVD where the viewer has the option of watching the track once or having it loop continuously.
    There is not enough space on the disc to duplicate the track so that is not an option.
    Any help would e much appreciated.
    Tony

    This is a perfectly scenerio for Stories. It allows you to duplicate a title without increasing the space. Look in the manual and have a go at it. Come back if you have questions.

  • Please help me to write a simple script.

    I wonder to tell a application named "Alien BBS", to input "right key" then wait for 5 seconds to input "left key".
    How can I do that by using a simple script ?
    tell application "AlienBBS"
    activate
    input ?
    end tell
    Please do me a favor to write~ cause I don't have any computer language background. Thanks in advance.

    Hi Tim,
    When you run an application it becomes a process. You can do stuff with the process. One thing is ui scripting which means that you're interacting with the user interface of tghe process. Some Processes don't have the same name as the application it was launched from, but usually they're named the same. You can try this:
    tell application "AlienBBS"
    activate
    end tell
    tell application "System Events"
    tell process "AlienBBS"
    keystroke (ascii character 29) -- right key
    delay 5
    keystroke (ascii character 28) -- left key
    end tell
    end tell
    You need to test it out and adjust.
    gl,

  • Simple scripting:  On frame (45) go back to first frame..??

    I am trying to do a simple script and I am having a huge brain fart.
    when I get to frame 45 I want the play head to go back to frame 1.  I have the below code but I am getting errors.  Can someone point my head in the right direction?
    <><><>
    onFrame (45) {
        this.gotoAndPlay(1);
    <><><>
    One error says that "is expecting semi-colon before or after first brace.....
    second possible error is "call to possible undefined method onFrame....
    Need help.

    If that is the first scene, the in the last frame (45) simply putting...
        gotoAndPlay(1);
    should work.
    If it is not the first scene, then you should label the first frame and use the label instead of the frame number...
        gotoAndPlay("firstFrameLabel");

  • Simple Script and Launchd error

    Hi, I 'm just trying to run a simple script tu restart afp services over night, I have try so much things but my script just refuse to run, got error 127 and now just dont know what to do next to make it work. Thanks for your help.
    My script Location: /script/afprestrat.sh
    sudo chmod a+x /script/afprestrat.sh
    The script:
    #!/bin/bash
    serveradmin stop afp
    sleep 2
    serveradmin start afp
    PLIST location :
    /Library/LaunchDaemons/com.compagny.afprestart.plist
    the Plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
            <key>Label</key>
            <string>com.compagny.afprestart</string>
            <key>ProgramArguments</key>
            <array>
                    <string>sh</string>
                    <string>/script/afprestart.sh</string>
            </array>
            <key>StandardErrorPath</key>
            <string>/Users/admin/Documents/script/afprestart_err.log</string>
            <key>StandardOutPath</key>
            <string>/Users/admin/Documents/script/afprestart.log</string>
            <key>StartCalendarInterval</key>
            <dict>
                    <key>Hour</key>
                    <integer>4</integer>
                    <key>Minute</key>
                    <integer>05</integer>
            </dict>
    </dict>
    </plist>
    Command:
    sudo launchctl load -w /Library/LaunchDaemons/com.compagny.afprestart.plist
    Console error:
    com.apple.launchd com.compagny.afprestart Exited with code:127
    and afp service wasnt restart.
    Any hint will be really apprciated.
    thx !!!

    Ok now I got this:
    127
    com.compagny.afprestart
    Ligne 2 and ligne 4 of the script command not found thats mean:
    serveradmin: command not found
    will try to add the full path of the serveradmin command in the script:
    #!/bin/bash
    /Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin stop afp
    sleep 2
    /Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin start afp
    Any better idea ?
    thanks !

  • Simple script that will export the coordinates (layer bounds - top left x,y)

    Hi,
    I'm looking for a simple script that will export the coordinates (layer bounds - top left x,y) of the layers to an seperate xml/txt file.

    Your screen capture looks like it's from Photoshop.
    In InDesign sub layers are page items, the containing layer has no dimension. So you could get all the page item's x, y, width, height. But you might have to consider groups and then the layering could be very complex. The stacking order could also get complex. Page items have an index, but it's relative to its parent container.

  • Simple script needed

    I work with InDesign doing text layout. I have used scripts, but have never had the time to learn JavaScript. I need what I assume is a fairly simple script. The script needs to do the following:
    1. Open a document.
    2. Ignore the missing font dialog box.
    3. Load all text style from another file, with the styles from that file overwriting the styles in the current document.
    4. Save the open document with the same name.
    The script needs to be able to batch process all of the document in a folder.
    If this is simple enough to do with several lines of code, I would appreciate it if someone could help me out. If it is more complex than that, I can possibly pay.

    Hi kwilson68, could you contact me by email? I might be able to help you out.

  • Simple Script - won't run - please help

    I've written a very simple script to check to see if a volume is mounted and then copy a directory to that volume if it is mounted:
    #!/bin/sh
    # check to see if network space mounted by looking for known folder
    if [ -d /Volumes/backupvolume ]; then
    cp –R /Users/username/Documents/foldertobebackedup /Volumes/backupvolume/username
    fi
    I made sure the cp command works by running it in the terminal - no trouble there.
    According to what I see in Xcode, all the syntax is correct and there are no errors.
    I then run the test on the script (per the Bombich instructions):
    sudo u+x /Users/user/backupscriptingtests/190520100730.sh
    I'm then required to enter the password (which I do and it accepts it)
    The next thing that happens though is the following error appears:
    sudo: u+x: command not found
    Any ideas on what I'm entering incorrectly here? Eventually, this script will be a logout hook to copy files for a user as a backup. This process seems like it should be very simple, which is why I'd rather do it this way instead of buying a backup program.
    Thanks!
    FYI: The -d command has brackets, left bracket with space at the beginning and space with right bracket just before the ;
    Message was edited by: mcguirek
    Message was edited by: mcguirek

    You need to include the actual backup volume name and home folder name where backupvolume, username, and user are. If the backup volume name contains spaces or other special characters, precede them with backslashes or put the whole path in single quotes.
    (53087)

Maybe you are looking for