How to insert multiple lines to the DB table

I create processes in BPM Studio 10 g.

I write below the code snippet to insert data in the database.
However, it does not work.

In the flow of the screen, the user can key in several rows of data. I try to add the to_char (element.purpose), but the Studio does not allow me to do.

I think the code is wrong, but I don't know how to change it.

----------------code in PBL------------------------------------------------------------------------------
for each item in BPMObject.group1
do

Insert in DBM. SOADEMO. SZ_TABLE (id, amount, purpose, result)
values (element.id, element.amount, element.purpose, element.result)

end

-----------------------------------------------------------------------------------------------------------------

ID, amount: decimal
Purpose, result: String

DBM: Module
A group is under a BPMObject but not inherit a table.

Hello

It seems that you do not use a variable in the statement "for each.

Right now you have:

for each item in BPMObject.group1...

You can add a new instance variable called 'bpmObject' which is of the type "BPMObject". You must use this variable in the job call the interactive component fills the table of the group. Then, you would change your logic to reflect this change by making it to read:

for each item in bpmObject.group1...

Hope this helps,
Dan

Tags: Fusion Middleware

Similar Questions

  • How to insert multiple lines using a single query

    Hi all

    How to insert multiple lines using a single query to the emp table?
    I have the number of rows to insert into table x. consumes a lot of time. I tried to insert several lines using a single query, but get errors. I know exactly the query to do this.


    Thank you
    Sunil

    Like this?

    SQL> create table test(id number , dt date);
    
    Table created.
    
    SQL> insert into test values(&a,&b);
    Enter value for a: 1   --- It asked me and I entered 1
    Enter value for b: sysdate  --- It asked me and I entered sysdate
    old   1: insert into test values(&a,&b)
    new   1: insert into test values(1,sysdate)
    
    1 row created.
    
    SQL> 
    

    g.

  • 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);
                    
    }

  • view multiple lines in the advanced table

    Hi all

    I have a requirement. I created advancedtable. When the page loads, to display 4 rows at a time. Can anyone please help how to achieve this req

    Kind regards
    Murali

    Hello

    Write the code below in AM that will create 5 blank lines in the advanced table.

    xxVOImpl voImpl = getxxLineVO1();
    voImpl.setWhereClause ("1 = 2");
    voImpl.executeQuery ();
    for (int i = 1; i)<=5>
    {
    Line = voImpl.createRow ();
    voImpl.insertRow (row);
    row.setNewRowState (Row.STATUS_INITIALIZED);
    row.setAttribute ("column1", i);
    row.setAttribute ("column2", "XYZ");
    }

    Kind regards
    Mary

  • Question: how to format multiple lines in the Guild: email field

    Hello

    I would like to have a message of several lines in the body of the email. I can get the text to include, but all in a single line. How can I get the lines to be separated into several separate lines? Everything except the formatting of the message works very well. Here's my script, which does not work:

    app.mailMsg ({}

    bUI: false,

    cTo:

              cCc: " includedaccounting@fheg. Follett.com ; ", "

    bassujetti: 'True full up' + "" + page1.storeInfo.arMajor.rawValue + "" + pages1_3.page1.storeInfo.storeNum.rawValue,.

    CMSG: 'Hello,';

    + 'The true for this store was completed. Please find the links to the list control and reconciliation below. \n » ;

    + "Checklist: \n";

    + ' Reconciliation: \n ";

    + "Thank you, \n";

    }}}}});

    Thank you

    MDawn

    Hello

    It seems that you may have a few errors of syntax... or is the forum scrap things up.  You do not want any semicolons in the argument mailMsg() and you used all the accolades.  Something like;

    app.mailMsg ({}

    bUI: false,

    cTo:

    cCc: "[email protected];"

    bassujetti: 'True full up' + "" + page1.storeInfo.arMajor.rawValue + "" + pages1_3.page1.storeInfo.storeNum.rawValue,.

    CMSG: 'Hello '

    + 'The true for this store was completed. Please find the links to the list control and reconciliation below. \n ".

    + "Checklist: \n".

    + ' Reconciliation: \n ".

    + "Thank you, \n".

    });

    Concerning

    Bruce

  • How to delete several lines in the details Table with PRIMARY KEY = ("VID", "LINEITEM")?

    Mr President

    My worm Jdev is 12.2.1.

    I have master tables / details.

    I have 2 lines for each PRIMARY KEY = ("VID", "LINEITEM") as below in the Details table.

    delete.png

    Please help how to get a button on a jsf page to remove these two lines at a time.

    Concerning

    So, in your app (data model) module, you have a master relationship / typical retail:

    And the relationship between them is based on some ViewLink

    Now go to the ViewLink, relationship, accessor.

    Take a look at the Destination accessor.

    Generate accessor object to check and give a name Acessor

    Then go to the master VO, Java and Include accessor, the class generate a display line:

    Go to the class view Java generated line, you'll find a method with the name of the accessor of the previous step, in the form of:

    public RowIterator getYourDetails...or_whaterever_IsAccessorName..() {
    }
    

    Now, in the same Java class, write the following Java method:

    public void removeDetails(){
      RowIterator details = getYourDetails...or_whaterever_IsAccessorName..(); // it is RowIterator over all details
      Row r = details.first();
      while (r != null) {
          r.remove();
          r = details.next();
      }
    }
    

    This method on the Cilent export line Interface:

    Finally, pass the data controls and drop this operation on the form as a button...

  • Submitting a form by creating multiple lines in the DB table

    Hi all

    I created a new Apex application and have created a table with columns - USER_ID, ADDRESS, TELEPHONE, CREATEDON etc.

    I want to read the USER_ID of the user and complete this field on the form and fill in the CREATEDON field with the date system. These two fields are hidden on the form.

    Now, when the user fills his address and phone on the form and click on send, 3 identical rows are inserted into the DB table. The values of user and date system are set correctly.

    To set the UserID field, I inserted a $APP_USER. in the default value of the form section. I am not able to understand why the Apex is to insert several lines even when you click the submit button once.

    Help, please.

    The problem is solved now. I noticed that add default values for the form fields added process duplicate. That's why the form has been processed three times. Remove the additional process solved the problem.

  • How to insert multiple lines in viewobject with primary key?

    Hello

    I use Jdeveloper 11.1.1.3.0 version.

    I create object entity based on the table of the database that have primary keys.
    I created the view on this entity object. I created an array of viewobject, with CreatInsert button and my primary key in the table may while the new record is added.

    Now my problem is that I have created several rows by pressing CreateInsert Button several rows of time are created and displayed in the table. I insert data in all columns of all rows when I click on the submit button (who have the Action "# {bindings.Commit.execute} ') will save data of any 1 line not all data line.

    How can I save all the lines that is created in a single transaction?

    Thanks in advance
    Amit

    Amit,

    I just tried this (all by default, no code written), and he recorded all of the lines. It must be something unique to your application. Michael asks a lot of questions.

    John

  • How to insert multiple photos in the word LOVE?

    My niece is getting married and as a gift for her and her mother (my sister-in-law friend and childhood), I would create a poster marriage.  Here is an example of what I'm trying to create:

    LOVE - Nicole.jpg

    What type of font to use to achieve this?  All tips are greatly appreciated.  Thank you.

    1. set up the word love using Ariel Black (let's call it the Master file). Resize it choosing Edit > transform > scale. Hold the SHIFT key when you size to maintain proportion.

    2. drag in your first image or copy and paste it in the Master file. It will appear as a layer above the text layer.

    3. Choose layer > create clipping mask. The image will now appear in the letters, and an arrow appears with him in the layers panel.

    4 edit > Transform > scale to reduce the picture so the subject is part of a letter. Hold down the SHIFT key when you size to maintain proportion.

    5 position the image and if a part extends into another letter, add a mask of the image to remove the box in this other letter.

    6. Repeat steps 2 through 5 for each image. You will find that when you drag in each additional image it will automatically get a mask of clipping as indicated by the arrow in the layers panel.

  • Select multiple lines in the double table

    It is possible to select several rows in double table uses a single select statement.

    for example, I want to

    column_name
    ---------------------
    1
    2
    3
    4

    Published by: vidya.ramachandra on December 14, 2009 08:24

    Use PLUG IN and LEVEL

    SQL> select level
      2  from   dual
      3  connect by level <= 10;
    
         LEVEL
    ----------
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    

    Edit
    And: Welcome to the forum ;)

    Published by: hoek on December 14, 2009 17:29

  • How Post 1 Lakh lines in the table very fast

    How to insert 1 lakh in the below table from a file

    (Icet) CREATE TABLE
    ID decimal (10,0) NOT NULL,
    name varchar (100) NOT NULL,
    decimal (10,0) grade NOT NULL,.
    PRIMARY KEY (id));

    The sample data in the table is in the format below:

    3003308, GAUTHIER GOPALA KRISHNA MURTHY, 1
    3398122, SHAIK DEVI, 2
    .....
    ....

    DSK wrote:

    the data file is in the C drive, and oracle is also installed in the same drive,

    Ok. You can then use the external table. But I would not. Table ICET is an existing table? And you must add the data stored in the file c:\res.txt to the table? If so, the best way, in my humble OPINION, would be SQL * Loader. With the external table, you will need to create one and then do something like INSERT icet SELCT of external_table. Selecting in the outer table will read c:\res.txt and load it into a temporary table that will be then inserted in icet taable. With SQL * Loader file c:\res.txt will be loaded directly into the icet table.

    SY.

  • 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 insert multiple images into a file

    How to insert multiple images into a file

    Hi Mary,

    See this tutorial on adding images in Photoshop Mix and the grantor together: http://tv.adobe.com/watch/learn-photoshop-cc/combine-two-photos/

    Hope that helps,

    Concerning

  • How to select multiple cells at the same time?

    Hello

    How to select multiple cells at the same time? What is the keyboard shortcut?

    Thank you to.

    Flo, a french guy.

    Hold down the CMD key when you select the cells.

  • How read datalog multiple files at the same time?

    Hello friends...

    can someone help me to show how read datalog multiple files at the same time?

    Here is the example of my case.

    I have 500 files in a folder. each file contains a waveform and its setting.

    and then I want to do a card spectral these files, because these files have been saved in the order.

    the point is to know how to read these 500 files at once? I made a program to read these files, but the program can read these files in one by one. So it is very uncomfortable to read 500 files one by one. can someone help me solve this problem? Thank you. I hope you can show me the program. Thank you again...

    Hi jojo,

    Well, in the range of functions daughter, you will find a function to list the contents of the folder. This allows to get the names of all the files datalog, and then use a loop FOR to read.

    No one is obliged to provide 500 names of files manually - that's why we use a programming language to let the computer do the stupid work

Maybe you are looking for

  • Firefox has become virtually impossible to use

    Firefox: 1A summer crashing all the time for about two months now and lose my tabs2 is now give endless "Script no longer" message every time I try to load media (only static pages of charges)3. will not again play teleseminar replays4. won't uninsta

  • Support of traditional Chinese

    Hello guys from Apple. Recently, I want to buy an iPhone, but I found that Chinese characters on iPhone look quite different from them on mobile phones Lumia. I love the正體中文, then, how can I turn the writing in style? Or it some provides a similar fo

  • How do I create a new folder in iCloud by using my iPad?

    How can I create a new folder to iCloud for my iPad? I can create a new folder to iCloud if I login to iCloud via Safari on my iMac or a MacBook. However when I use Safari on my iPad, I receive a 'Welcome screen' tthat is useless because it does not

  • How to isolate svchost memory problem use which is BOUNCING - Windows 7 SP1,.

    I have a seemingly common problem with svchost executing a sub-process that uses too much memory (about 1 GB). I read some of the tips advice in other places, and MS know using Process Explorer and disabling of processes such as Windows Update, even

  • Windows 7 VPN

    What is VPN?