How to add only lines that are checked in a form?

I have a number of lines in a form. Some people have a checkmark field and others do not. I want to create two calculated fields. One to give me the totals if the line is activated and the other to give me the totals if line is not checked. I can't understand how to do this.

Hello.

You should have followed the suggestion of Francis and use the possibilities of computing built into the forms.

Approach:
-Create a form element in the block where you have your field to summarize.
-Put the 'calculation' formula mode
-As a formula, put something like

DECODE(:BLOCK.CHECKBOXITEM, 'Y',:BLOCK.ITEMTOSUMUP, 0);

where "Y" is the value of the cehckbox when checked.

-Create a block of control to the "Single Document" property value to true
-put a formula-else that newly created the block, the value 'Calculation Mode' to 'Summary', block to summarize your data block element to summarize in the previous formula-column created.
-But, but not least, set the property to "Question everything" block which your article to sum up to 'true '.

She's. No need for any triggers or the same logic to take on a loop on the block.

I hope this helps.

Tags: Oracle Development

Similar Questions

  • How to add multiple lines when the button is clicked

    How to add multiple lines when the click on button now is just add a row .plz give me idea how... waiting for answer

    / public final class screen extends MyScreen
    {
    /**
    * Creates a new object of MyScreen
    */
    ObjectChoiceField obj1 obj2, obj3, obj4.
    Table of String() = {'101 ', ' 102'};
    String of shadow [] = {"Shade1", "Shade2"};
    Rolls of string [] = {'101 ', ' 102'};
    String cutting [] = {"100-150", "150-200"};
    Chain of selectedindex1, selectedindex2, selectedindex3, selectedindex4;
    LabelField lbl1 lbl2, lbl3, lbl4;
        
    GFM LinedGridFieldManager;
    HFM HorizontalFieldManager, hfm1, hfm2 hfm3;
    VerticalFieldManager vfmMain;
        
    public MyScreen()
    {
        
    Set the displayed title of the screen
    hfm1 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    hfm2 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    hfm3 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    HFM = new HorizontalFieldManager (HorizontalFieldManager.FIELD_RIGHT);
    vfmMain = new VerticalFieldManager (Manager.NO_VERTICAL_SCROLL |) Manager.NO_HORIZONTAL_SCROLLBAR);
            
    obj1 = new ObjectChoiceField ("", graph, 0, FIELD_LEFT);
    obj2 = new ObjectChoiceField ("", blind, 0, FIELD_LEFT);
    Obj3 = new ObjectChoiceField ("", rolls, 0, FIELD_LEFT);
    Obj4 = new ObjectChoiceField ("", cuts, 0, FIELD_LEFT);
            
    LBL1 = new LabelField("");
    LBL2 = new LabelField("");
    lbl3 = new LabelField("");
    lbl4 = new LabelField("");
            
    ButtonField btnAdd = new ButtonField ("ADD", FIELD_RIGHT);
            
    GFM = new LinedGridFieldManager (4, LinedGridFieldManager.VERTICAL_SCROLL);
            
    hfm1.setMargin (20, 0, 10, 0);
    hfm1. Add (new LabelField ("Chart"));
    hfm1. Add (obj1);
    hfm1. Add (new LabelField ("Shade"));
    hfm1. Add (obj2);
            
    hfm2. Add (new LabelField ("Rolls"));
    hfm2. Add (Obj3);
    hfm2. Add (new LabelField ("Cuts"));
    hfm2. Add (Obj4);
    HFM. Add (btnAdd);
            
    GFM. Add (new LabelField ("Chart"));
    GFM. Add (new LabelField ("Shade"));
    GFM. Add (new LabelField ("Rolls"));
    GFM. Add (new LabelField ("Cuts"));
            
    vfmMain.add (hfm1);
    vfmMain.add (hfm2);
    vfmMain.add (hfm3);
    vfmMain.add (hfm);
    vfmMain.add (new SeparatorField());
    vfmMain.add (gfm);
    Add (vfmMain);
            
    btnAdd.setChangeListener (new FieldChangeListener()
    {
    ' Public Sub fieldChanged (field field, int context) {}
    TODO self-generating method stub
    selectedindex1 = chart [obj1.getSelectedIndex ()];
    selectedindex2 = shade [obj2.getSelectedIndex ()];
    selectedindex3 = rolls [obj3.getSelectedIndex ()];
    selectedindex4 = cuts [obj4.getSelectedIndex ()];
                    
    While (LBL1. GetText(). Equals("") | LBL2. GetText(). Equals("") | lbl3. GetText(). Equals("") | lbl4. GetText(). Equals(""))
    {
    LBL1. SetText (selectedindex1);
    LBL2. SetText (selectedindex2);
    lbl3. SetText (selectedindex3);
    lbl4. SetText (selectedindex4);
                    
    GFM. Add (LBL1);
    GFM. Add (LBL2);
    GFM. Add (lbl3);
    GFM. Add (lbl4);
                    
    }
    }
    });
    }
    }

    Hi Piya,

    I run your code, and according to your logic that it works correctly.

    It's adding that line only once because according to your logic that one line can be added to MDT, if you do not want to add line on each click on the button, follow these steps:

    selectedindex1 = chart [obj1.getSelectedIndex ()];
    selectedindex2 = shade [obj2.getSelectedIndex ()];
    selectedindex3 = rolls [obj3.getSelectedIndex ()];
    selectedindex4 = cuts [obj4.getSelectedIndex ()];

    Lbl1 LabelField = new LabelField("");
    Lbl2 LabelField = new LabelField("");
    LabelField lbl3 = new LabelField("");
    LabelField lbl4 = new LabelField("");
    If (LBL1. GetText(). Equals("") | LBL2. GetText(). Equals("") | lbl3. GetText(). Equals("") | lbl4. GetText(). Equals(""))
    {
    LBL1. SetText (selectedindex1);
    LBL2. SetText (selectedindex2);
    lbl3. SetText (selectedindex3);
    lbl4. SetText (selectedindex4);
                    
    GFM. Add (LBL1);
    GFM. Add (LBL2);
    GFM. Add (lbl3);
    GFM. Add (lbl4);
                    
    }

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • How to remove special characters that are not available in the key board

    Hi all
    How to remove special characters that are not available in the key board.
    select '106    ©      500049' str from dual;
    
    After removal of the special symbols ( not only copy right, it can be any special symbol other than key board symbols), I want to add a single space between two number.
    
    Output should be like:
    Str
    106 500049
    Thank you for your help in advance.
    select
     '106    © ® (k)      500049' str
    ,regexp_replace('106    © ® (k)     500049', '[^[:digit:]]+', ' ') r
    from dual
    
  • get rid of lines that are completely understood by the other lines

    using oracle 10 g

    I have a requirement where I have a few groups that have a start date and end date, and
    I don't know how many lines per group, it is dynamic.

    I need to get rid of all the lines that are completely understood by the other lines per group
    To tell if an online group has started on January 1, 2000 and ending on January 1, 2001
    and another group line begins February 1, 2000 and ends at 2000 1 dec
    only the line Jan to Jan should appear.

    so, for
    with t as
    (
        select 'A' grp, 1 id, to_date('01-01-2000', 'MM-DD-YYYY') start_dt, to_date('01-01-2001', 'MM-DD-YYYY') end_dt from dual union all
        select 'A' grp, 2 id, to_date('02-01-2000', 'MM-DD-YYYY') start_dt, to_date('12-01-2000', 'MM-DD-YYYY') end_dt from dual union all
        select 'A' grp, 3 id, to_date('03-01-2000', 'MM-DD-YYYY') start_dt, to_date('12-10-2000', 'MM-DD-YYYY') end_dt from dual union all
        select 'A' grp, 4 id, to_date('07-01-2000', 'MM-DD-YYYY') start_dt, to_date('01-10-2001', 'MM-DD-YYYY') end_dt from dual union all
        select 'A' grp, 5 id, to_date('01-01-2000', 'MM-DD-YYYY') start_dt, to_date('01-01-2001', 'MM-DD-YYYY') end_dt from dual 
     )
    I don't want to see
    GRP,ID,START_DT,END_DT
    A,1,1/1/2000,1/1/2001
    A,4,7/1/2000,1/10/2001
    Published by: pollywog on July 20, 2010 11:49

    Published by: pollywog on July 20, 2010 11:56

    Published by: pollywog on July 20, 2010 11:56

    Well, I do not get the exact release you do, but I'm sure that this complies with your verbal condition.

    You may have a fault in your output specified? It is also quite possible, that there is something wrong with my query :)

    with
       t as
    (
       select 'A' grp, 1 id, to_date('01-01-2000', 'MM-DD-YYYY') start_dt, to_date('01-01-2001', 'MM-DD-YYYY') end_dt from dual union all
       select 'A' grp, 2 id, to_date('02-01-2000', 'MM-DD-YYYY') start_dt, to_date('12-01-2000', 'MM-DD-YYYY') end_dt from dual union all
       select 'A' grp, 3 id, to_date('03-01-2000', 'MM-DD-YYYY') start_dt, to_date('12-10-2000', 'MM-DD-YYYY') end_dt from dual union all
       select 'A' grp, 4 id, to_date('07-01-2000', 'MM-DD-YYYY') start_dt, to_date('01-10-2001', 'MM-DD-YYYY') end_dt from dual union all
       select 'A' grp, 5 id, to_date('01-01-2000', 'MM-DD-YYYY') start_dt, to_date('01-01-2001', 'MM-DD-YYYY') end_dt from dual union all
       select 'A' grp, 6 id ,to_date('12-25-1999', 'MM-DD-YYYY') start_dt, to_date('01-05-2001', 'MM-DD-YYYY') end_dt from dual union all
       select 'A' grp, 7 id, to_date('02-01-2001', 'MM-DD-YYYY') start_dt, to_date('02-01-2001', 'MM-DD-YYYY') end_dt from dual
    )
    select
       grp,
       id,
       start_dt,
       end_dt,
       last_start_dt,
       last_end_dt
    from
    (
       select
          lag(start_dt)   over (partition by grp order by start_dt asc)  as last_start_dt,
          lag(end_dt)     over (partition by grp order by start_dt asc)  as last_end_dt,
          grp,
          id,
          start_dt,
          end_dt
       from
          t
    )
    where last_start_dt is null
    or
    not
    (
             start_dt  between last_start_dt and last_end_dt
       and   end_dt    between last_start_dt and last_end_dt
    )
    order by start_dt asc;
    
    G                 ID START_DT             END_DT               LAST_START_DT        LAST_END_DT
    - ------------------ -------------------- -------------------- -------------------- --------------------
    A                  6 25-DEC-1999 12 00:00 05-JAN-2001 12 00:00
    A                  3 01-MAR-2000 12 00:00 10-DEC-2000 12 00:00 01-FEB-2000 12 00:00 01-DEC-2000 12 00:00
    A                  4 01-JUL-2000 12 00:00 10-JAN-2001 12 00:00 01-MAR-2000 12 00:00 10-DEC-2000 12 00:00
    A                  7 01-FEB-2001 12 00:00 01-FEB-2001 12 00:00 01-JUL-2000 12 00:00 10-JAN-2001 12 00:00
    
    4 rows selected.
    
  • How to create the home group and how to connect two computers that are running windows 7. and also Remote Desktop connection!

    Someone help me how to create the home group and how to connect two computers that are running windows 7. and also Remote Desktop connection!
    step by step information!

    Hello

    I suggest you to refer to the links and check if it helps:

    Create a homegroup

    http://Windows.Microsoft.com/en-us/Windows7/create-a-HomeGroup

    Join a homegroup

    http://Windows.Microsoft.com/en-us/Windows7/join-a-HomeGroup

    Setting up a network home

    http://Windows.Microsoft.com/en-us/Windows7/setting-up-a-home-network

    Remote Desktop connection

    http://Windows.Microsoft.com/en-us/Windows7/products/features/Remote-Desktop-connection

    What types of connections remote desktop should I allow?

    http://Windows.Microsoft.com/en-us/Windows7/what-types-of-Remote-Desktop-connections-should-I-allow

    Remote Desktop connection: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/Remote-Desktop-connection-frequently-asked-questions

    Let us know if it helps.

  • How to add an image that fill the browser?

    How to add an image that fills the browser when it is resized? Like this site Freelance Design & photography: cotton - ink.co.uk where the window or the filling of pict cabin browser.

    Thank you

    Hello

    Please, try the following steps.

    1 create a rectangle and make it 100% width by pressing the button width 100%.

    2 give this rectangle at the height of your choice.

    3. fill the image desired in the rectangle using fill option and make 'Center' "scale to fill."

    Please let me know in case you are looking for something else.

    Concerning

    Vivek

  • How can I find photographs that are not assigned to any collection?

    Hello!

    I use LR 5.7.1 on a Mac.

    When I've airbrushed raw with PS CC images (and do not need file PSD more) I export the PSD (which is in my catalog) in JPG format and let it automatically add to my catalog. After that, I remove the PSD file. Which works very well.

    But... the new JPG file is not assigned to any collection. This is no problem unless I forgot to do it manually after export (and import).

    This brings me to my question.

    How can I find photographs that are not assigned to any collection?

    I tried with a smart collection after I found nothing suitable in the filter library. The search criteria, I tried are Source-> Collection with any of the conditions. One with an empty field, then with just a space and so on.

    Does anyone have a good tip for me?

    Thomas

    You can also add numbers if you have collections that do not use characters of the alphabet.

  • How to add more line by line?

    Hi all

    Please let me know how to add addition line by line as the title:

    DEPTNO num1, num2, num3 total num
    1100 20 30
    1200 20 10
    1300 40
    1400 30


    your suggestion would be greatly appreciated.

    Something like that?

     SELECT deptno,num1,num2,num3, num1+num2+num3 "Tot"
     FROM ....
    
  • How to open zip files that are included with various tutorials?

    How to open zip files that are included with various tutorials?  Everytime I try I get the message, "It seems that the file has been moved or renamed."  I am a total novice with this stuff!  Thanks for your help.

    On Windows? Right-click on the .zip file that you want to unpack (unzip) and click on "Extract all" from the context menu.

  • How to harvest two images that are overlapping?

    I was hoping someone can help me with this. I Googled it a little and tried different things, but cannot understand this. I don't even think that I have the correct terminology.

    I try to combine the two images. I have attached an image that illustrates what I'm tryng to do - I want to take a common stick figure and cultures so that part of it is hidden and looks like it is coming from a door or a hole. How I get there parts that are outside the door? I know this is probably very simple, but I just can't understand it!

    PORTAL.PNG

    Thanks for any help you can offer me.

    Mary

    Artificial intelligence you have to work with duplicates and slice things, that is to put the part of the dorframe which is originally under the figure, the upper part above and then use a copy of the top to cut the dark areas of the figure with Pathfinder operations or a clipping path.

    Mylenium

  • How can I remove lines that intersect?

    So I have to admit, I'm kind new to Illustrator and trying to figure out how to remove the lines that intersect this drawing I did, can be cut into a cutter to cut in one piece. The thing is, I don't know how to do. Here is the file, in which case it helps to solve the problem.

    https://files.me.com/eovnu87435ds/99tjo3

    Any help is greatly appreciated!

    First things first

    Select the two concentric circles of shift by clicking on it with the selection or direct Selection tool

    then go to object > compound path > make or the command (command) 8 to make a compound path of two circles

    then select the crossed rectangles and the path to the composed circle you just made

    with the three selected go to pathfinder Panel and click on the first icon at the top left (unit)

    and who will do

  • How to add a line break in shortDesc?

    How to add a line break in shortDesc?

    Hey Danny,

    I think you can't... but I did two work around to achieve this goal:

    1. in IE7 (not Mozilla Firefox) If you type a space between the words will be automatically pass the new line like:


    shortDesc = "firstWord... spaces... Second word"/ >

    2. you can use popup like a ToolTip like:








    Sameh Nassar

  • How to add directional lines on a map in a phone book to show the destinations?

    Directions in iPhoto do not match the real software. How do I add directional lines on a map to show where we left and where are final destination will be?

    What version of iPhoto do you use?  Or you use 'Photos for Mac', as you post the pictures to Mac forum?

    In iPhoto 9.6.1 between that you can add markers place lines by activating the lines in the options for the cards.  The value 'Lines' 'Right' or 'curve '.

  • Filter to show only images that are within the project pro first itself offline?

    I tried to google I can think, all directions and results are always "how to add a link to the files offline in the first" so this isn't my problem.

    In After Effects, there is a trick very convenient to type "missing" in the search prompt in the project Panel, and it will show you precisely all assets being referenced by AE offline. I looking for this kind of feature in Premiere Pro CC 2014 (I don't have not yet went to CC2015 I'm nearing completion on an important project).

    The challenge that I face, it is a huge file (feature documentary) with literally thousands of assets which has many sequences that have endured many iterations. And even if I don't get a "media is offline" WARNING when I OPEN the file, I get a warning of "material offline is present in this export and will be encoded using the chart of media offline" whenever I have to export. I'm trying to see if there is a filter that will show me ONLY the offline files that are always reference by Premiere Pro so I can remove it, because throughout most of them are likely obsolete.

    Any help out there?

    errorScreenie.jpg

    There is an option in the metadata view to turn on hardware offline.

    Click on the Panel of the menu of the project for metadata display window...

Maybe you are looking for

  • Firefox does not start after the upgrade: error code 2324

    I updated Firefox on my desktop running Windows 7 Enterprise (64-bit). Installer stub downloads and works through the installation, but does not automatically start Firefox. If I click on the link in the task bar, nothing happens. Same thing with tha

  • Why can't I access the new updates of Firefox 4?

    Just updated to Firefox 4 and finished rebooting, but nothing has changed. The browser looks the same as version 3.6.16. I see no Button Firefox, the Awesome Bar does not work, the Stop/Reload have not been combined into one, the Home button has not

  • Satellite P300 (Visa Office) - webcam & USB ports not working DO NOT

    His light not to connect USB devices but otherwise no connection to printers or memory sticks etc.Check indicicate composition USB device problem. Can wher I go from here?

  • color printing problem

    When I print a color computer point it comes out black and white, even when it suffice to make a color copy of the printer it comes out in color.

  • MKLINK errors

    I'm trying to reduce my boot partition to clone to a solid state drive (SSD) to do, I want to move some user data folders and their files to another drive, because the active player located in the boot partition will be replaced by the SSD. The SSD i