Help with some calculation fields

I'm trying to add a few calculation fields to a form but don't know how the script should be written.
All my fields are in a form called:
topmostSubform
The first field I need to calculate is a percent field;
name:
Current_Percent1
fields needed for calculation:
Current_Salary1/Current_CIP1
so Current_Percent1=Current_Salary1/Current_CIP1
I tried this on the script editor but it didnt work:
Current_Percent1.=(topmostSubform.Current_Salary1/topmostSubform.Current_CIP1)
can someone help me out?

Ok, looks like I got it. I did have it as formcalc but it looks like I wrote in too much info.
I got it to work by setting SHOW to *caculate and adding (Current_Salary1/Current_CIP1) only
Looks like I was making it harder than it needed to be.
Thanks

Similar Messages

  • A ALV with some editable fields which have dictionary search help

    Hi all:
           There is a requirement to implement an ALV with some editable fields which have dictionary search help, do you have any idea?
    thank you very much

    Hi - yes it can be done.
    1st in your object select the component SALV_WD_TABLE (ALV component) * do all the bindings of your component to your VIEW, Component usage interface, etc.
    When you are declaring your context node attributes if you add a TYPE Data element that has a search help bind to the data element it will be accessible in your ALV or in the Attribute there's a INPUT HELP that option that you can add the search help there but you need to have your ALV input enable
    for example:
    data: lr_input_field  Type Ref To cl_salv_wd_uie_input_field,
    lt_column Type salv_wd_t_column_ref,
    ls_colum Type salv_wd_s_column_ref,
    lv_value Type Ref To cl_salv_wd_config_table,
    l_col_name type string,
    lr_cmp_usage Type Ref To if_wd_component_usage,
    lo_interfacecontroller Type Ref To iwci_salv_wd_table.
    lr_cmp_usage = wd_this->wd_cpuse_alv( ).  *ALV is the name you enter for your component usage when declaring component SALV_WD_TABLE at the beginning.
    if lr_cmp_usage->has_active_component( ) IS INITIAL.
    lr_cmp_usage->create_component( ).
    endif.
    lo_interfacecontroller = wd_this->wd_cpifc_alv( ). *once again your ALV name
    lv_value = lo_interfacecontroller->get_model( ).
    lt_columns = lv_value->if_salv_wd_column_settings~get_columns( ).
    Loop at lt_columns into ls_column.
    l_col_name = ls_column-r_column->get_id( ).
    create object lr_input_field
    exporting
    value_fieldname = l_col_name.
    ls_column-r_column->set_cell_editor( value = lr_input_field ). *this will made all your columns input fields
    endloop.
    hope this help!
    Jason PV

  • Best Solution for Creating an Onlne Purchase order form with multiple calculation fields

    I am a bit confused.  Our school has a Forms Central account which works great for our registration forms but I need to find a solution for creating an online purchase form with multiple calculation fields - I know that forms central does not support calculation fields (too bad) but I know that Acrobat Pro does... soooo...
    Can you create the forms in Acrobat and then somehow integrate the advanced features into forms central?  Do they talk to each other?  Is this easy to do? .... I guess another way to putting it is can you create the forms in Acrobat including all of the advanced features for payment calculation and then host it online using Forms Central to manage and collect the data? (I guess that really is my question)
    Thanks (how does this compare to a solution like Formstack?)

    Hi, thanks.
    The naming convention was the consistant up until a point when I read that you need a '.' syntax (?!) - does anyone know if this is true?
    Attached is a version with Bernd Alheit's suggestion and with all the naming of the fields being consistant. It's still not working for me though after doing this and I'm stuck as to why, because I think it should work. I've also tried writing the calcualting line of code in the same manner that Bernd Alheit suggests before I came on here, and it wouldn't work then.
    As with any coding, it must be something to which I have done, but I can't see it anywhere
    Any ideas? Thanks for helping me
    Cheers

  • Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
    Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
    Thanks,
    Hussein

  • I have made .indd file with some form fields in it, now haw to read these fields and manipulate its content through script in indesign

    I have made .indd file with some form fields in it, now haw to read these fields and manipulate its content through script in indesign

    It's probably best to ask in the InDesign Scripting forum:
    InDesign Scripting

  • Help with some beginner code

    Hello, I am new to java and I need a bit of help with some code that I'm writing. here is the code:
    import javax.swing.*;
    public class Test{
         public static void main(String[] args){
         JOptionPane.showMessageDialog(null,"We will now build a block with *'s","Block",1);
         String input=JOptionPane.showInputDialog(null,"Type a number: ","Number",3);
         int number=Integer.parseInt(input);
         int count=0; int count2=0;
         for(count2=0; count2<number; count2++){
              for(count=0; count<number; count++){
              System.out.print("* ");
    System.exit(0);
    }Now, all I need is to build a block of *'s with the number that the user inputs. With the code that I wrote I get the correct number of *'s but not in the form of a block. They just print out in a straight line. I know this is a very simple task but could someone please help me out? What do I need to modify in my code so that the *'s print out arranged as a block like so:
    **********

    Your code only uses the print method which prints without a carriage return/line feed. So you need to add a line of code to print a carriage return/line feed. Where? well that is your task to work out.

  • [8i] Need help with some workday calculations

    At the beginning of the month, I got help with a workday calculation in: [8i] Help with function with parameters (for workday calculation)
    Now, as it turns out, I was able to locate a function in the database that does what I want, however, it is much slower to use the function than to join two copies of the CALN table (Please see referenced thread for details. I can copy them to this thread if necessary.) I need to verify that the pre-existing function has 'DETERMINISTIC' in it, as I would guess that if it doesn't, it would be much slower than it could be.
    But now, I've come across a situation where I have to do multiple workday calculations in the same query--enough that I have to join 6 copies of my CALN table. I can't imagine that is at all efficient. I believe it was Frank K. who said (in the original thread) that if the function was slow, I should consider alternatives. Can anyone help me identify some of those alternatives? I'm definitely at that point now. (This query is one I'm using as the base for a report in Oracle BI, and let's just say it doesn't like my query, even though my syntax appears to be correct, and I would guess that joining 6 copies of one table is at least partly to blame for this).
    Note: I'm working with Oracle 8i

    OK, I finally have some sample data... I tried to make it thorough. I've included data in the CALN table YTD + tomorrow, so that any workday calculations using SYSDATE will work.
    CREATE TABLE caln
    (     clndr_dt     DATE          NOT NULL
    ,     clndr_yr     NUMBER
    ,     shop_day     NUMBER
    ,     shop_dt          DATE
    ,     shop_wk          NUMBER
    ,     shop_yr          NUMBER
    ,     shop_days     NUMBER
    ,     clndr_days     NUMBER
         CONSTRAINT caln_pk PRIMARY KEY (clndr_dt)
    INSERT INTO     caln
    VALUES (To_Date('12/23/2009','mm/dd/yyyy'),2009,247,To_Date('12/23/2009','mm/dd/yyyy'),51,2009,7631,10950);
    INSERT INTO     caln
    VALUES (To_Date('01/01/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),52,2009,7631,10959);
    INSERT INTO     caln
    VALUES (To_Date('01/02/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),52,2009,7631,10960);
    INSERT INTO     caln
    VALUES (To_Date('01/03/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),1,2010,7631,10961);
    INSERT INTO     caln
    VALUES (To_Date('01/04/2010','mm/dd/yyyy'),2010,1,To_Date('01/04/2010','mm/dd/yyyy'),1,2010,7632,10962);
    INSERT INTO     caln
    VALUES (To_Date('01/05/2010','mm/dd/yyyy'),2010,2,To_Date('01/05/2010','mm/dd/yyyy'),1,2010,7633,10963);
    INSERT INTO     caln
    VALUES (To_Date('01/06/2010','mm/dd/yyyy'),2010,3,To_Date('01/06/2010','mm/dd/yyyy'),1,2010,7634,10964);
    INSERT INTO     caln
    VALUES (To_Date('01/07/2010','mm/dd/yyyy'),2010,4,To_Date('01/07/2010','mm/dd/yyyy'),1,2010,7635,10965);
    INSERT INTO     caln
    VALUES (To_Date('01/08/2010','mm/dd/yyyy'),2010,5,To_Date('01/08/2010','mm/dd/yyyy'),1,2010,7636,10966);
    INSERT INTO     caln
    VALUES (To_Date('01/09/2010','mm/dd/yyyy'),2010,0,To_Date('01/08/2010','mm/dd/yyyy'),1,2010,7636,10967);
    INSERT INTO     caln
    VALUES (To_Date('01/10/2010','mm/dd/yyyy'),2010,0,To_Date('01/08/2010','mm/dd/yyyy'),2,2010,7636,10968);
    INSERT INTO     caln
    VALUES (To_Date('01/11/2010','mm/dd/yyyy'),2010,6,To_Date('01/11/2010','mm/dd/yyyy'),2,2010,7637,10969);
    INSERT INTO     caln
    VALUES (To_Date('01/12/2010','mm/dd/yyyy'),2010,7,To_Date('01/12/2010','mm/dd/yyyy'),2,2010,7638,10970);
    INSERT INTO     caln
    VALUES (To_Date('01/13/2010','mm/dd/yyyy'),2010,8,To_Date('01/13/2010','mm/dd/yyyy'),2,2010,7639,10971);
    INSERT INTO     caln
    VALUES (To_Date('01/14/2010','mm/dd/yyyy'),2010,9,To_Date('01/14/2010','mm/dd/yyyy'),2,2010,7640,10972);
    INSERT INTO     caln
    VALUES (To_Date('01/15/2010','mm/dd/yyyy'),2010,10,To_Date('01/15/2010','mm/dd/yyyy'),2,2010,7641,10973);
    INSERT INTO     caln
    VALUES (To_Date('01/16/2010','mm/dd/yyyy'),2010,0,To_Date('01/15/2010','mm/dd/yyyy'),2,2010,7641,10974);
    INSERT INTO     caln
    VALUES (To_Date('01/17/2010','mm/dd/yyyy'),2010,0,To_Date('01/15/2010','mm/dd/yyyy'),3,2010,7641,10975);
    INSERT INTO     caln
    VALUES (To_Date('01/18/2010','mm/dd/yyyy'),2010,11,To_Date('01/18/2010','mm/dd/yyyy'),3,2010,7642,10976);
    INSERT INTO     caln
    VALUES (To_Date('01/19/2010','mm/dd/yyyy'),2010,12,To_Date('01/19/2010','mm/dd/yyyy'),3,2010,7643,10977);
    INSERT INTO     caln
    VALUES (To_Date('01/20/2010','mm/dd/yyyy'),2010,13,To_Date('01/20/2010','mm/dd/yyyy'),3,2010,7644,10978);
    INSERT INTO     caln
    VALUES (To_Date('01/21/2010','mm/dd/yyyy'),2010,14,To_Date('01/21/2010','mm/dd/yyyy'),3,2010,7645,10979);
    INSERT INTO     caln
    VALUES (To_Date('01/22/2010','mm/dd/yyyy'),2010,15,To_Date('01/22/2010','mm/dd/yyyy'),3,2010,7646,10980);
    INSERT INTO     caln
    VALUES (To_Date('01/23/2010','mm/dd/yyyy'),2010,0,To_Date('01/22/2010','mm/dd/yyyy'),3,2010,7646,10981);
    INSERT INTO     caln
    VALUES (To_Date('01/24/2010','mm/dd/yyyy'),2010,0,To_Date('01/22/2010','mm/dd/yyyy'),4,2010,7646,10982);
    INSERT INTO     caln
    VALUES (To_Date('01/25/2010','mm/dd/yyyy'),2010,16,To_Date('01/25/2010','mm/dd/yyyy'),4,2010,7647,10983);
    INSERT INTO     caln
    VALUES (To_Date('01/26/2010','mm/dd/yyyy'),2010,17,To_Date('01/26/2010','mm/dd/yyyy'),4,2010,7648,10984);
    INSERT INTO     caln
    VALUES (To_Date('01/27/2010','mm/dd/yyyy'),2010,18,To_Date('01/27/2010','mm/dd/yyyy'),4,2010,7649,10985);
    INSERT INTO     caln
    VALUES (To_Date('01/28/2010','mm/dd/yyyy'),2010,19,To_Date('01/28/2010','mm/dd/yyyy'),4,2010,7650,10986);
    INSERT INTO     caln
    VALUES (To_Date('01/29/2010','mm/dd/yyyy'),2010,20,To_Date('01/29/2010','mm/dd/yyyy'),4,2010,7651,10987);
    INSERT INTO     caln
    VALUES (To_Date('01/30/2010','mm/dd/yyyy'),2010,0,To_Date('01/29/2010','mm/dd/yyyy'),4,2010,7651,10988);
    INSERT INTO     caln
    VALUES (To_Date('01/31/2010','mm/dd/yyyy'),2010,0,To_Date('01/29/2010','mm/dd/yyyy'),5,2010,7651,10989);
    INSERT INTO     caln
    VALUES (To_Date('02/01/2010','mm/dd/yyyy'),2010,21,To_Date('02/01/2010','mm/dd/yyyy'),5,2010,7652,10990);
    INSERT INTO     caln
    VALUES (To_Date('02/02/2010','mm/dd/yyyy'),2010,22,To_Date('02/02/2010','mm/dd/yyyy'),5,2010,7653,10991);
    INSERT INTO     caln
    VALUES (To_Date('02/03/2010','mm/dd/yyyy'),2010,23,To_Date('02/03/2010','mm/dd/yyyy'),5,2010,7654,10992);
    INSERT INTO     caln
    VALUES (To_Date('02/04/2010','mm/dd/yyyy'),2010,24,To_Date('02/04/2010','mm/dd/yyyy'),5,2010,7655,10993);
    INSERT INTO     caln
    VALUES (To_Date('02/05/2010','mm/dd/yyyy'),2010,25,To_Date('02/05/2010','mm/dd/yyyy'),5,2010,7656,10994);
    INSERT INTO     caln
    VALUES (To_Date('02/06/2010','mm/dd/yyyy'),2010,0,To_Date('02/05/2010','mm/dd/yyyy'),5,2010,7656,10995);
    INSERT INTO     caln
    VALUES (To_Date('02/07/2010','mm/dd/yyyy'),2010,0,To_Date('02/05/2010','mm/dd/yyyy'),6,2010,7656,10996);
    INSERT INTO     caln
    VALUES (To_Date('02/08/2010','mm/dd/yyyy'),2010,26,To_Date('02/08/2010','mm/dd/yyyy'),6,2010,7657,10997);
    INSERT INTO     caln
    VALUES (To_Date('02/09/2010','mm/dd/yyyy'),2010,27,To_Date('02/09/2010','mm/dd/yyyy'),6,2010,7658,10998);
    INSERT INTO     caln
    VALUES (To_Date('02/10/2010','mm/dd/yyyy'),2010,28,To_Date('02/10/2010','mm/dd/yyyy'),6,2010,7659,10999);
    INSERT INTO     caln
    VALUES (To_Date('02/11/2010','mm/dd/yyyy'),2010,29,To_Date('02/11/2010','mm/dd/yyyy'),6,2010,7660,11000);
    INSERT INTO     caln
    VALUES (To_Date('02/12/2010','mm/dd/yyyy'),2010,30,To_Date('02/12/2010','mm/dd/yyyy'),6,2010,7661,11001);
    INSERT INTO     caln
    VALUES (To_Date('02/13/2010','mm/dd/yyyy'),2010,0,To_Date('02/12/2010','mm/dd/yyyy'),6,2010,7661,11002);
    INSERT INTO     caln
    VALUES (To_Date('02/14/2010','mm/dd/yyyy'),2010,0,To_Date('02/12/2010','mm/dd/yyyy'),7,2010,7661,11003);
    INSERT INTO     caln
    VALUES (To_Date('02/15/2010','mm/dd/yyyy'),2010,31,To_Date('02/15/2010','mm/dd/yyyy'),7,2010,7662,11004);
    INSERT INTO     caln
    VALUES (To_Date('02/16/2010','mm/dd/yyyy'),2010,32,To_Date('02/16/2010','mm/dd/yyyy'),7,2010,7663,11005);
    INSERT INTO     caln
    VALUES (To_Date('02/17/2010','mm/dd/yyyy'),2010,33,To_Date('02/17/2010','mm/dd/yyyy'),7,2010,7664,11006);
    INSERT INTO     caln
    VALUES (To_Date('02/18/2010','mm/dd/yyyy'),2010,34,To_Date('02/18/2010','mm/dd/yyyy'),7,2010,7665,11007);
    INSERT INTO     caln
    VALUES (To_Date('02/19/2010','mm/dd/yyyy'),2010,35,To_Date('02/19/2010','mm/dd/yyyy'),7,2010,7666,11008);
    INSERT INTO     caln
    VALUES (To_Date('02/20/2010','mm/dd/yyyy'),2010,0,To_Date('02/19/2010','mm/dd/yyyy'),7,2010,7666,11009);
    CREATE TABLE ords
    (     ord_nbr          NUMBER          NOT NULL
    ,     sub_nbr          NUMBER          NOT NULL
    ,     ord_stat     VARCHAR2(2)
    ,     ord_qty          NUMBER
    ,     part_nbr     VARCHAR2(5)
         CONSTRAINT ords_pk PRIMARY KEY (ord_nbr, sub_nbr)
    INSERT INTO     ords
    VALUES (1,1,'CL',10,'PART1');
    INSERT INTO     ords
    VALUES (1,2,'CL',5,'PART1');
    INSERT INTO     ords
    VALUES (25,1,'CL',15,'PART2');
    INSERT INTO     ords
    VALUES (14,1,'OP',12,'PART3');
    INSERT INTO     ords
    VALUES (33,1,'CL',25,'PART1');
    INSERT INTO     ords
    VALUES (33,2,'CL',15,'PART1');
    INSERT INTO     ords
    VALUES (33,3,'OP',10,'PART1');
    INSERT INTO     ords
    VALUES (7,1,'PL',18,'PART2');
    INSERT INTO     ords
    VALUES (96,1,'PL',10,'PART3');
    INSERT INTO     ords
    VALUES (31,1,'CL',20,'PART2');
    CREATE TABLE oops
    (     ord_nbr          NUMBER          NOT NULL
    ,     sub_nbr          NUMBER          NOT NULL
    ,     op_nbr          VARCHAR2(4)     NOT NULL
    ,     mach_id          VARCHAR2(4)
    ,     oper_stat     VARCHAR2(2)
    ,     plan_start_dt     DATE
    ,     plsu          NUMBER
    ,     plrn          NUMBER
         CONSTRAINT ords_pk PRIMARY KEY (ord_nbr, sub_nbr, op_nbr)
    -- NOTE:
    -- for the orders with a status of 'CL' or 'PL' in the 'ords' table, I'm not bothering to put
    -- in more than two operations (though in reality more would be there) since they should be
    -- ignored in the final result anyway
    INSERT INTO     oops
    VALUES (1,1,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (1,1,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (1,2,'0010','123A','CP',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (1,2,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (25,1,'0005','123A','CP',TO_DATE('01/18/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (25,1,'0030','110C','CL',TO_DATE('01/19/2010','mm/dd/yyyy'),4,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0010','127A','CP',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (14,1,'0025','110C','CL',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0040','050C','CP',TO_DATE('01/13/2010','mm/dd/yyyy'),1.3,0.15);
    INSERT INTO     oops
    VALUES (14,1,'0050','220B','WK',TO_DATE('01/14/2010','mm/dd/yyyy'),4,0.25);
    INSERT INTO     oops
    VALUES (14,1,'0065','242B','AV',TO_DATE('01/18/2010','mm/dd/yyyy'),1.5,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0067','150G','NA',TO_DATE('01/19/2010','mm/dd/yyyy'),2,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0100','250G','NA',TO_DATE('01/20/2010','mm/dd/yyyy'),2.1,0.2);
    INSERT INTO     oops
    VALUES (33,1,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,1,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,2,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,2,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,3,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,3,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,3,'0020','220B','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1.7,0.15);
    INSERT INTO     oops
    VALUES (33,3,'0030','150G','NA',TO_DATE('01/13/2010','mm/dd/yyyy'),1.3,0.05);
    INSERT INTO     oops
    VALUES (33,3,'0055','150G','NA',TO_DATE('01/15/2010','mm/dd/yyyy'),2.1.,0.1);
    INSERT INTO     oops
    VALUES (7,1,'0005','123A','NA',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (7,1,'0030','110C','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (96,1,'0010','127A','NA',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (96,1,'0025','110C','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (31,1,'0005','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (31,1,'0030','110C','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    CREATE TABLE mach
    (     mach_id          VARCHAR2(4)     NOT NULL
    ,     desc_short     VARCHAR2(9)     
    ,     group          VARCHAR2(7)
         CONSTRAINT ords_pk PRIMARY KEY (mach_id)
    INSERT INTO     mach
    VALUES     ('123A','desc here','GROUPH1');
    INSERT INTO     mach
    VALUES     ('259B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('110C','desc here','GROUPJ1');
    INSERT INTO     mach
    VALUES     ('050C','desc here','GROUPK2');
    INSERT INTO     mach
    VALUES     ('220B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('242B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('150G','desc here','GROUPL1');
    INSERT INTO     mach
    VALUES     ('250G','desc here','GROUPL2');
    INSERT INTO     mach
    VALUES     ('242B','desc here','GROUPH2');

  • Need help with a calculated column - is there any way to reference a value in the current row?

    Hey guys,
    I'm a bit of a DAX newbie, and I'm running into a block. I'm creating a Power View report about IT tickets. We are going to be creating a cube to automate the data soon, I'm currently working with a flat Excel Data Table of data to demonstrate the Power
    View reporting capabilities to the team. I need the default display to show the top 4-5 items basked on the Ticket Count. The three applicable columns I'm using are the TicketID, the ContactReason, and the AssetCategory - all three are
    text. One slide will show the top five Contact Reasons by Ticket Count, and the other will show the top five Categories by Ticket Count. The users will see this default view, but will be able to change it to see differently ranked items or can clear the
    ranking slicer altogether.
    What I've accomplished so far is to create the Calculated Field [Ticket Count] = COUNTA(Table1[TicketID])
    And 2 other calculated fields:
    [Contact Rank] = RANKX(ALL(Table1[ContactReason]),[Ticket Count],,,DENSE)
    [Asset Rank] = RANKX(ALL(Table1[AssetCategory]),[Ticket Count],,,DENSE)
    If I were creating a Pivot Table, this would be great. These fields calculate everything the right way. The problem is, I need to have a Rank slicer on each slide and the calculation by itself contains no data - with no data, there's nothing to slice. I
    realized I need to actually have columns of data so I can create a slicer. I need each row of the table to show the same [Contact Rank] for every instance of a particular ContactReason (and the same for the [Asset Rank] and AssetCategory).
    The RANKX formulas pasted into the Calculated Column section only show a value of 1 - with no Pivot table summarizing the fields, it's counting each row's ticket once, giving every line the tied Rank of #1.
    I've solved the problem in Excel by creating 2 Pivot Tables on a separate sheet that have the data field and the calculated field for ContactRason and AssetCategory. Then on my Excel Data Table, I've added two columns that do a VLOOKUP and pull over a the
    Calculated Rank from each Pivot Table that match the ContactReason and AssetCategory fields. This works on the flat Excel Data Table now, but will not be a solutions when we start pulling the data from the cube (and there is no flat table).
    What I think I need is an Expression for the RANKX formula that can give me, for each row, the count of all of the times a ContactReason shows up in an entire column. There's only about 100,000 lines of data and each ContactReason or AssetCategory
    may show up several thousand times. But if I can get the expression to return that count, then the RANKX formula should work in the Column. If it wasn't a DAX formula, I'd use a COUNTIF and say 'Count the entire ContactReason column anytime it's equal to the
    ContactReason on THIS row', but in DAX I don't know how to reference a single value in a row. I've tried the CALCULATE() formula, but it seems like the filter needs a specific value, and doesn't work on a dynamic "cell" value.
    Any help would be greatly appreciated! (I hope it all makes sense!)

    If I've understood you correctly then the ALLEXCEPT function may be what you're after and it could be applied in a similar way to the following...
    =
    RANKX(
    ALL(Table1),
    CALCULATE(
    COUNTROWS(table1),
    ALLEXCEPT(Table1, Table1[ContactReason])
    DENSE
    If this has missed the mark, would it be possible to clarify the requirement further?
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • Need Help With Custom Calculation Script

    Hey everyone.  I'm using Acrobat Pro X and stumbling a bit on the syntax for the following equation.  I need to add the value of "Cell1" & "Cell2" then add the value of "Cell3".  However,the value of "Cell3" is entered by the user and specifies a percentage of the sum of "Cell1 & "Cell2".  For example: If the user enters "3" into "Cell3" I need the returned value to be 3% of the sum of "Cell1" + "Cell2".  If the user enters "9" into "Cell3" I need the returned value for "Cell3" to be 9% of the sum of "Cell1 & Cell2" and the end result needs to be the sum of "Cell1+Cell2+Cell3".  In greater detail:
    If "Cell1" = $500, "Cell2" = $500 and "Cell3" = "3" then I need the returned value to be $1030.00.
    I hope this makes sense. Here's what I have so far but alas, it's not working.  Any help would be GREATLY appreciated.
    // Get first field value, as a number
    var v1 = +getField("Cell1").value;
    // Get second field value, as a number
    var v2 = +getField("Cell2").value;
    // Get processing field value, as a number
    //var v3 = +getField("Cell3"/100).value;
    // Calculate and set this field's value to the result
    event.value = v3+(v1+v2);
    Thanks,
    Solan

    I posted an answer but realized it wasn't what you wanted. There is some confusion about what you want for Cell3. On the one hand, you say you want the user to enter a vaule in the field, but them you say you want its value to be calculated based on what the user enters and two other field values. It seems to me Cell3 should be the field that the user enters the percentage and the calculated field's (Cell4) script could then be:
    // Get first field value, as a number
    var v1 = +getField("Cell1").value;
    // Get second field value, as a number
    var v2 = +getField("Cell2").value;// Get processing field value, as a number
    // Get the percentage
    var v3 = +getField("Cell3").value;
    // Calculate and set this field's value to the result
    event.value = (1 + v3 / 100) * (v1 + v2);

  • Help with Custom calculation script in Acrobat 8

    Hi all, I am using acrobat 8 on OS 10.5
    I am trying to add certain fields (numbers) and then subtract another field value to give an end result.
    I don't know anything about Javascript, would anyone be able to help with any info on how I achieve this result? I can only see Add, x and average etc... nothing there for subtraction
    Thanks for any help in advance
    Swen

    This should get you started:
    >if (event) {
    // get values from two text fields
    var a = Number(this.getField('Text1').value);
    var b = Number(this.getField('Text2').value);
    // subtract the values and show it
    this.event.target.value = a - b;
    Place this in a 3d text field, as a Custom Calculation Script.

  • Help with query calculations (recursive)

    Hi All,
    I want some help with a query using a base rate and the result use in the next calculation year.
    Here an example:
    create table rate_type(
    rate_type_id    number,
    rate_desc       nvarchar2(50),
    rate_base_year  number
    insert into rate_type(rate_type_id, rate_desc, rate_base_year) values (1, 'Desc1', 4.6590);
    insert into rate_type(rate_type_id, rate_desc, rate_base_year) values (2, 'Desc2', 4.6590);
    create table rates (
    rate_type_id number
    rate_year    number,
    rate_value   number
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2012, 1.2);
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2013, 1.3);
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2014, 1.4);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2012, 1.2);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2013, 1.3);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2014, 1.4);The calculation for the first year should be the base rate of the rate type. The next year should use the result of the previous year and so on.
    The result of my sample data is:
    2012 = 4.659 + 1.2 + 4.659 * (1.2 * 0.01) = 5.9149
    2013 = 5.9149 + 1.3 + 5.9149 * (1.3 * 0.01) = 7.1859
    2014 = 7.1859 + 1.4 + 7.1859 * (1.4 * 0.01) = 8.4721Query result:
    NAME 2012 2013 2014
    Desc1 5.9149 7.1859 8.4721
    Desc2 XXXX XXX XXXX
    How can I do this in one select statement? Any ideas?
    Thanks!

    Assuming you are on 11.2:
    with t as (
               select  a.rate_type_id,
                       rate_desc,
                       rate_year,
                       rate_base_year,
                       rate_value,
                       count(*) over(partition by a.rate_type_id) cnt,
                       row_number() over(partition by a.rate_type_id order by rate_year) rn
                 from  rate_type a,
                       rates b
                 where a.rate_type_id = b.rate_type_id
        r(
          rate_type_id,
          rate_desc,
          rate_year,
          rate_base_year,
          rate_value,
          cnt,
          rn,
          result
         ) as (
                select  rate_type_id,
                        rate_desc,
                        rate_year,
                        rate_base_year,
                        rate_value,
                        cnt,
                        rn,
                        rate_base_year + rate_value + rate_base_year * rate_value * 0.01 result
                  from  t
                  where rn = 1
               union all
                select  t.rate_type_id,
                        t.rate_desc,
                        t.rate_year,
                        t.rate_base_year,
                        t.rate_value,
                        t.cnt,
                        t.rn,
                        r.result + t.rate_value + r.result * t.rate_value * 0.01 result
                  from  r,
                        t
                  where t.rate_type_id = r.rate_type_id
                    and t.rn = r.rn + 1
    select  *
      from  (
             select  rate_desc name,
                     rate_year,
                     result
               from  r
               where rn <= cnt
      pivot (sum(result) for rate_year in (2012,2013,2014))
      order by name
    NAME             2012       2013       2014
    Desc1        5.914908  7.2918018 8.79388703
    Desc2        5.914908  7.2918018 8.79388703
    SQL> Obviously pivoting assumes you know rate_year values upfront. If not, then without pivoting:
    with t as (
               select  a.rate_type_id,
                       rate_desc,
                       rate_year,
                       rate_base_year,
                       rate_value,
                       count(*) over(partition by a.rate_type_id) cnt,
                       row_number() over(partition by a.rate_type_id order by rate_year) rn
                 from  rate_type a,
                       rates b
                 where a.rate_type_id = b.rate_type_id
        r(
          rate_type_id,
          rate_desc,
          rate_year,
          rate_base_year,
          rate_value,
          cnt,
          rn,
          result
         ) as (
                select  rate_type_id,
                        rate_desc,
                        rate_year,
                        rate_base_year,
                        rate_value,
                        cnt,
                        rn,
                        rate_base_year + rate_value + rate_base_year * rate_value * 0.01 result
                  from  t
                  where rn = 1
               union all
                select  t.rate_type_id,
                        t.rate_desc,
                        t.rate_year,
                        t.rate_base_year,
                        t.rate_value,
                        t.cnt,
                        t.rn,
                        r.result + t.rate_value + r.result * t.rate_value * 0.01 result
                  from  r,
                        t
                  where t.rate_type_id = r.rate_type_id
                    and t.rn = r.rn + 1
    select  rate_desc name,
            rate_year,
            result
      from  r
      where rn <= cnt
      order by name,
               rate_year
    NAME        RATE_YEAR     RESULT
    Desc1            2012   5.914908
    Desc1            2013  7.2918018
    Desc1            2014 8.79388703
    Desc2            2012   5.914908
    Desc2            2013  7.2918018
    Desc2            2014 8.79388703
    6 rows selected.
    SQL> SY.

  • Can someone help with auto-size fields in forms?

    I created a form in Acrobat for my team members with auto-size text fields that allow to shrink the text when the field size is not large enough to show the entire text. When I then open the same form file with Adobe Reader on my machine with text that has shrunk in some field, I can see all the text and have also a scroll function when the text size has reached its lower limits and there is still more text to show.
    However, when I receive the filled out forms back from other team members' iPads (they use my template created with Acrobat), the text didn't shrink as on a PC version and the scroll function is disabled. I checked the template and the fields are correctly set to auto-size left and they do work on my PC's and laptop's Adobe Reader. But the iPad version of Adobe Reader may cause some issues.
    Can anybody help with solutions?
    Thank you!
    Klaus

    The filled version of your PDF document (20140722 Daily Meeting Report...pdf) is no longer a PDF form because it has been flattened.
    Once an interactive PDF form (such as your template version) is flattened, all form fields are replaced with images of filled data.  You can no longer interact with form fields, edit form data, or tap/click any buttons in the flattened PDF document.  That is the reason why the text in auto-size text fields did not shrink.
    When you email a PDF document (including a PDF form) in Adobe Reader for iOS, the E-mail Document dialog is displayed.
    In this particular case, your team member must have selected "Share Flattened Copy".
    If you would like to keep the interactivity of a PDF form, you can select "Share Original Document".  Please advise your team members to select the "Share Original Document" option when emailing filled forms.
    Unfortunately, once flattened, a PDF document cannot be reverted back to the original "unflattened" state.  However, if your team members still have the original filled forms, they can resend the forms with the "Share Original Document" option.
    Please let us know if you have further questions.

  • Hierarchy with some other fields behind

    Hello I have a problem with some a little SQL
    I have this SQL and that works fine:
    SELECT Lpad(Unit_id, Length(unit_id) + LEVEL *4,'-') || ' ' || unit || ' ' || unit_level_id || ' ' || unit_rel_to_parent_val_from as Hierarchie
    from ua_unit where unit_type_id = 1 and unit_rel_to_parent_val_from &lt;= sysdate
    start with unit_parent_id = 'CH'
    connect by prior unit_id = unit_parent_id;
    Now I have somthing like this
    Hierarchie
    ----A ASR 2
    --------A10 ASR FS 3 01.07.2002
    ------------100 ASR FS Bnk East 4 01.07.2002
    ------------105 ASR FS Bnk Central 4 01.07.2002
    Thats create a hierarchy but I need some other fields beyond this hierarchy...how can I do that?
    Greets
    Tierrii
    Edited by: user10411886 on Mar 16, 2009 2:37 AM
    Oh I see the columns are there but miles away from the hierarchy column ( working with SQL Developer 1.2.1) how they can be near to the hierarchy column?
    Edited by: user10411886 on Mar 16, 2009 2:54 AM
    Now I have what I want. Thanks for all the help and Inputs from you guys!

    Thank for the fast reply..
    this with the other columns is the right way first, fist I have now this hierarchy and now after this hierarchy
    there should be some other columns listed, but when i do this
    SELECT Lpad(Unit_id, Length(unit_id) + LEVEL *4,'-') || ' ' || unit || ' ' || unit_level_id as Hierarchie, unit, unit_id
    from ua_unit where unit_type_id = 1 and unit_rel_to_parent_val_from &lt;= sysdate
    start with unit_parent_id = 'CH'
    connect by prior unit_id = unit_parent_id;
    That will not work...
    I hope you now what I mean :8}
    Edited by: user10411886 on Mar 16, 2009 2:27 AM
    Oh I see the columns are there but miles away from the hierarchy column ( working with SQL Developer 1.2.1) how they can be near to the hierarchy column?

  • Need a little help with some errors.

    Receiving some errors..
    btn2.addActionListener(new ActionListener() {
    and also
    frame.setLocation(400,400);
    frame.setVisible(true);
    }<<~~has 2 errors here...
    Both above have class or interface expected errors..clueless on what i'm missing at the moment.
    Anyone mind pointing out what {'s and }'s i'm missing?
         btn1.addActionListener(new ActionListener() {
                             public void actionPerformed(ActionEvent evt) {
                                  btn1actions();
              private void btn1actions() {
                   if (radio1.isSelected()) System.out.println("Radio Button 1 is selected.");
                   if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.");
         btn2.addActionListener(new ActionListener() {
                                       public void actionPerformed(ActionEvent evt) {
                                            btn2actions();
                        private void btn2actions() {
                             if (radio1.isSelected()) System.out.println("Radio Button 1 is selected.");
                             if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.");
                   btn3.addActionListener(new ActionListener() {
                                       public void actionPerformed(ActionEvent evt) {
                                            btn1actions();
                        private void btn3actions() {
                             txt1.setText("");
                             txt1.requestFocus();
    public static void main(String[] args) {
        Test2 frame = new Test2();
        frame.setTitle("Test Frame");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(400, 300);
        frame.setLocation(400,400);
        frame.setVisible(true);
    }

    All my code..finally posted...just need help with more errors.
    F:\DocumentsTest2.java:169: ';' expected
              btn1.addActionListener(new ActionListener()) {
    ^
    F:\Documents\Test2.java:176: illegal start of expression
              private void btn1actions() {
    ^
    F:\Documents\Test2.java:191: illegal start of expression
              private void btn2actions() {
    ^
    F:\Documents\.java:202: illegal start of expression
              private void btn3actions() {
    ^
    4 errors
    Tool completed with exit code 1
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test2 extends JFrame{
         static JButton btn1,btn2,btn3;
         static JTextField txt1;
         static JRadioButton radio1,radio2;
           public Test2() {
             Container container = getContentPane();
             container.setLayout(new BorderLayout());
              //Create Panels
                JPanel Panel1 = new JPanel();
                JPanel Panel2 = new JPanel();
                JPanel Panel3 = new JPanel();
                JPanel Panel4 = new JPanel();
                JPanel Panel5 = new JPanel();
                JPanel Panel6 = new JPanel();
                JPanel Panel7 = new JPanel();
                JPanel Panel8 = new JPanel();
                JPanel Panel9 = new JPanel();
                JPanel Panel10 = new JPanel();
              //Set Layout for Panels
              Panel3.setLayout(new BorderLayout());
              Panel4.setLayout(new BorderLayout());
              Panel5.setLayout(new BorderLayout());
              Panel6.setLayout(new BorderLayout());
              Panel10.setLayout(new BorderLayout());
              //Create the Various Fonts and Colors for this GUI
              Font font1 = new Font("SansSerif", Font.BOLD, 20);
              Font font2 = new Font("Serif", Font.PLAIN, 15);
              Color color1 = new Color(3,15,125);//A Dark Blue Color
              Color color2 = new Color(201,29,10);//A Red Color
              Color color3 = new Color(127,127,127);//A Grey Color
              //Create Buttons and Labels
             btn1 = new JButton("Submit");
             btn2 = new JButton("Display Schedule");
             btn3 = new JButton("Enter New Name");
             JLabel label1 = new JLabel("Student Name");
             JLabel label2 = new JLabel("Course Number");
              JLabel label3 = new JLabel("Welcome to the Java Community College");
              JLabel label4 = new JLabel("Registration System!");
              //Declare Text Field For Entering Student Names
              txt1 = new JTextField(15);
              //"Put Course Number from another Method Here"
              String[] courseStrings = { "CISM2230 A", "CISM2230 B", "CISM1110 A", "CISM1110 B", "CISM1120 A", "CISM1120 B" };
              JComboBox Combo1 = new JComboBox(courseStrings);
              //Declare Radio Buttons for Add and Drop Course
              radio1 = new JRadioButton("Add a Course", false);
              radio2 = new JRadioButton("Drop a Course", false);
              ButtonGroup radioButtons = new ButtonGroup();
              radioButtons.add(radio1);
              radioButtons.add(radio2);
              //Panel 10 is the Main Displaying Panel
              Panel10.add(Panel3, BorderLayout.NORTH);
              Panel10.add(Panel4, BorderLayout.CENTER);
              Panel10.add(Panel8, BorderLayout.SOUTH);
              //Panel 3 Used to Display Label 3 and 4 using Panels 1 and 2
              Panel3.add(Panel1, BorderLayout.NORTH);
              Panel3.add(Panel2, BorderLayout.CENTER);
              Panel1.add(label3);
             Panel2.add(label4);
              //Panel 4 Used to Display Student Name, Txt1, Course Number, Combo Box and Radio Buttons
             Panel5.add(label1, BorderLayout.NORTH);
             Panel5.add(txt1, BorderLayout.CENTER);
             Panel6.add(label2, BorderLayout.NORTH);
              Panel6.add(Combo1, BorderLayout.CENTER);
              Panel7.add(radio1, BorderLayout.NORTH);
              Panel7.add(radio2, BorderLayout.CENTER);
              Panel4.add(Panel5, BorderLayout.NORTH);
              Panel4.add(Panel6, BorderLayout.CENTER);
              Panel4.add(Panel7, BorderLayout.SOUTH);
              //Panel 8 Used to Display the Buttons
              Panel9.add(btn1, BorderLayout.CENTER);
              Panel9.add(btn2, BorderLayout.CENTER);
              Panel9.add(btn3, BorderLayout.SOUTH);
              Panel8.add(Panel9, BorderLayout.CENTER);
              //Setting Background, ForeGround and Font of all Text.
             Panel1.setBackground(color3);
             Panel2.setBackground(color3);
             Panel3.setBackground(color3);
             Panel4.setBackground(color3);
             Panel5.setBackground(color3);
             Panel6.setBackground(color3);
             Panel7.setBackground(color3);
             Panel8.setBackground(color3);
             Panel9.setBackground(color3);
             Panel10.setBackground(color3);
             btn1.setBackground(color3);
             btn2.setBackground(color3);
             btn3.setBackground(color3);
             radio1.setBackground(color3);
             radio2.setBackground(color3);
             btn1.setFont(font2);
             btn2.setFont(font2);
             btn3.setFont(font2);
             Combo1.setFont(font2);
             Combo1.setBackground(color3);
             Combo1.setForeground(color1);
             label1.setFont(font2);
             label2.setFont(font2);
             label3.setFont(font1);
             label4.setFont(font1);
             label1.setForeground(color2);
             label2.setForeground(color2);
             label3.setForeground(color1);
             label4.setForeground(color1);
             container.add(Panel10);
              //Setting Keyboard Shortcuts to Radio Buttons and Regular Buttons
              btn1.setMnemonic('S');
              btn2.setMnemonic('D');
              btn3.setMnemonic('E');
              radio1.setMnemonic('A');
              radio2.setMnemonic('C');
              //ActionListener
              btn1.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                        btn1actions();
              private void btn1actions() {
                   if (radio1.isSelected()){ System.out.println("Radio Button 1 is selected. Button 1")};
                   if (radio2.isSelected()){ System.out.println("Radio Button 2 is selected. Button 1")};
              btn2.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                                            btn2actions();
              private void btn2actions() {
                   if (radio1.isSelected()) System.out.println("Radio Button 1 is selected(Button 2).");
                   if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.Button 2");
              btn3.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                        btn1actions();
              private void btn3actions() {
                   txt1.setText("");
                   txt1.requestFocus();
         public static void main(String[] args) {
             JavaCollegeTest2 frame = new JavaCollegeTest2();
             frame.setTitle("Project 4");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             frame.setSize(400, 300);
             frame.setLocation(400,400);
             frame.setVisible(true);
    }

  • Need PP Functional help for some legacy fields

    Hi all,
    I am a BW consultant. I need to replicate in SAP-BW some reports that are currently in a legacy system (non SAP). I have identified the functional area for those reports as PP. I need a little functional help from you guys to find out what some fields in the legacy system mean in SAP. Once I know the R/3 fields (and source tables if someone can tell me), I can move forward with mapping those fields into BW objects and the rest of the process.
    The reason why I am seeking help from here is, unfortunately our functional team is not available right now and their availability is indefinite. So I just want to keep myself busy till they are back.
    Well, here are the fields that I need help for (for now)
    The report is for Daily summary of activities at a plant
    Work order process
    Work order type
    Daily Created Bags
    Daily Capacity Bags (Bags per Hour Rate* Available Hours)
    Daily Count of Work Order Number
    Goods issued for work order completion
    Goods finished
    Please help me identify what R/3 fields (and their tables) correspond to the above legacy fields
    Points WILL be assigned for helpful answers
    Thank you

    Hi,
    Work order process - I assume this is the set of operations for the order - AFVC (table)
    Work order type      - AUFK - (Field) AUART data needs to be fetched for AUFNR(Work order number)
    Daily Created Bags - MSEG - data needs to be fetched for BWART = 101 or 102 and AUFNR(Work order number)
    Goods issued for work order completion - MSEG- data needs to be fetched for  BWART = 261 and AUFNR(Work order number)
    Goods finished - MSEG - data needs to be fetched for BWART = 101 or 102 and AUFNR(Work order number)
    Regards,
    Prasobh

Maybe you are looking for