How to delete a row of a template by giving a condition in the smartform

hi all,
I HAD A TEMPLATE IN A SMARTFORM.
WHICH CONSISTS OF 4ROWS AND 4 COLOUMNS.
MY REQUIREMENT IS .
IF I SPECIFY A PARTICULAR PLANT(WERKS) CONDITION FOR EXAMPLE 2060.
THE ENTIRE 4TH ROW WITH CONTENTS HAS TO BE DELETED.
AND FOR OTHER PLANTS IT HAS TO BE NORMAL.
NOTE :  NOT ONLY THE CONTENTS BUT ALSO THE ENTIRE 4TH ROW NEEDS TO BE DELETED
regards

Hi,
There are 2 ways to achieve the results you want.
1) Instead of creating a TEMPLATE under node, use TABLE option available. Provide name of the internal table of 4 * 4 as Resource internal table in DATA tab of Table. Before Table node, add program lines containing the logic to remove the line based on the condition you want.
2) Create 2 different templates. One containg 4 rows, another containg 3 rows. In CONDITION tab of both the template , provide the conditions for which the templates will be visible. Solution will definitely work out still not preferable as the scenario you mentiioned is clearly a requirement of Table and not template.
Regards,
Amee.

Similar Messages

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • How To Delete a Row From a TableView !!!!

    Hi,
    Does any know how to delete a row from a table view model.
    I have a TableViewModel being displayed, when the user select the particular row and click delete i want that particular row to be deleted.
    Any Suggestions How.
    Thanks,
    Emmanuel.

    If u want to delete single row, then set the property of TableView - selectionMode="SINGLESELECT". Select the radio button and click on delete button. In the main program, you can get the row value like...
    public void onDeleteButtonClicked(Event event) throws PageException {
    TableView table = (TableView) this.getComponentByName ("idTableView");
    DefaultTableViewModel dmodel = myBean.beanModel;
    String pid = "", row_selected;
    // Get the first visible row
    int firstVisibleRow = table.getVisibleFirstRow();
    // Get the last visible row
    int lastVisibleRow = table.getVisibleLastRow();
    for (int i = firstVisibleRow; i <= lastVisibleRow; i++) {
    if (table.isRowSelected(i)) {
      row_selected = i;
      pid = dmodel.getValueAt(i, 1).toString();
    "i" will give you the row no, pid has the value of the row at first column.
    Hope this helps.
    Thanks,
    Praveen

  • How to Delete duplicates rows without using rowid/distinct.

    How to delete duplicates rows present in a table without using rowid or even distinct.

    How about:
    SQL> SELECT * FROM t1;
             A          B
             1          2
             2          3
             1          2
             4          4
             4          4
             4          4
    SQL> DELETE FROM t1
      2  WHERE (a, b) IN (SELECT a, b FROM t1
      3                   GROUP BY a, b
      4                   HAVING COUNT(*) > 1) and
      5        rownum = 1;
    1 row deleted.
    SQL> /
    1 row deleted.
    SQL> /
    1 row deleted.
    SQL> /
    0 rows deleted.
    SQL> SELECT * FROM t1;
             A          B
             2          3
             1          2
             4          4Although, if I was asked a similar question with all those restrictions, my first response would be along the lines of: Is this question indicative of the way I will have to work if I join this company? If so, there is no point answering because I wouldn't touch this job with a ten foot pole.

  • Deleting a row from a table containing CLOB as one of the columns

    When i delete a row from a table which contains a CLOB (internal clob) i.e. CLOB or BLOB column, Will the CLOB data will also be deleted ? I understand that what exactly stored in the CLOB column is the clob locator which points to the actual data.
    So, when I delete this row, the clob locator will be deleted, but will the actual data what this locator is pointing to is also deleted ??? if not what is the process to delete the data the locator is pointing to when the row containing the locator is deleted ? If this is not happening then the actual data might become an orphan data which nobody has access to, will automatic garbage cleaning occurs on a frequent intravels to delete unaddressed data residing on the database server ?
    Thanks in advance for the help, can email me at [email protected] alternatively.
    Regards,
    Srinivasa C.

    Michael,
    Thanks very much for your inputs, here are the results i got when i tried the way you explained in your answer, the TRUNCATE command made the actual size back to normal, but the delete is not the same, so, how can i delete the data that a particular clob locator may point to ?
    truncate would delete all the rows of the table, which might not serve my purpose, i would like to delete a row and also it's associated clob data from the database! is there anyway to do this ?
    is there any limitation on the ool_sample size? i am basically a c++ programmer, i am looking for some function like FREE which would free the allocated memory to the clob once the locator is deleted.
    your help is greatly appreciated - Thanks!
    :-) Srini.
    ==========================
    My Results:
    ==========================
    SQL> create table sample (
    2 id integer primary key,
    3 the_data CLOB default empty_clob() )
    4 lob (the_data) store as ool_sample;
    Table created.
    SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
    2 from user_segments
    3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
    4 group by segment_name;
    SEGMENT_NAME
    SOTRAGE_CONSUMED
    OOL_SAMPLE
    20K
    SAMPLE
    10K
    SQL> select count(*) from sample;
    COUNT(*)
    0
    SQL> begin
    2 for i in 1..1000
    3 loop
    4 insert into sample values (i, RPAD('some data', 4000) );
    5 end loop;
    6 end;
    7 /
    PL/SQL procedure successfully completed.
    SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
    2 from user_segments
    3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
    4 group by segment_name;
    SEGMENT_NAME
    SOTRAGE_CONSUMED
    OOL_SAMPLE
    6420K
    SAMPLE
    70K
    SQL> delete sample;
    1000 rows deleted.
    SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
    2 from user_segments
    3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
    4 group by segment_name;
    SEGMENT_NAME
    SOTRAGE_CONSUMED
    OOL_SAMPLE
    6420K
    SAMPLE
    70K
    SQL> commit;
    Commit complete.
    SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
    2 from user_segments
    3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
    4 group by segment_name;
    SEGMENT_NAME
    SOTRAGE_CONSUMED
    OOL_SAMPLE
    6420K
    SAMPLE
    70K
    SQL> begin
    2 for i in 1..1000
    3 loop
    4 insert into sample values (i, rpad('some data', 4000));
    5 end loop;
    6 end;
    7 /
    PL/SQL procedure successfully completed.
    SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
    2 from user_segments
    3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
    4 group by segment_name;
    SEGMENT_NAME
    SOTRAGE_CONSUMED
    OOL_SAMPLE
    9616K
    SAMPLE
    70K
    SQL> truncate table sample;
    Table truncated.
    SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
    2 from user_segments
    3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
    4 group by segment_name;
    SEGMENT_NAME
    SOTRAGE_CONSUMED
    OOL_SAMPLE
    20K
    SAMPLE
    10K

  • How to delete multiple songs from iPhone 5S without losing form iTunes? The unchek function has not worked. Why?

    How to delete multiple songs from iPhone 5S without losing form iTunes? The unchek function has not worked. Why?

    Sorry I had to reply through your profile Gail from Maine, my PC has java issues. In any event, when I delete them directly from my device everything is perfect and cool. However, in the rare instance I want to add new music that I actually buy in stores (I know, quite the unique and old-fashioned idea...but hey Im an audiophile) once I upload the tunes, everytime I sync my library it re-adds everything that I spent hours deleting. In a perfect world, I thought I could maintain a massive iTunes Library, and add or delete (remove) songs from my iPhone to save both memory or keep my iPhone selections more current/apt to my musical "tastes" at that time. I know about the whole playlist thing, but thought there might be an easier way. ie - checking/un-checking the little box next to the song name, and then doing a sync. Again, everytime I do this however, whether everything is checked or un-checked it adds the entire library! So frustrating. Any suggestions. Thank you graiously in advance for your help.

  • How to delete a row in a session

    Hi im new in jsp.
    I want to create a webshop.
    When i select my products it goos to a shopping cart.
    After the customer confirms the order then it will be put in to a database.
    Now i want to create a function in de shopping cart for the customer to delete the products he doesnt want to buy.
    This is my shoppingcart code.
    Sorry also for my english.
    <%@ page language="java" %>
    <jsp:useBean id ="bestellingBean" class="java.util.Vector" scope="session" />
    <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <head>
    <title>Winkelmandje</title>
    <link href="Style.css" rel="stylesheet" type="text/css" />
    </head>
    <%@page
         import="java.util.Vector"
         import = "java.io.*"
         import = "java.lang.*"
         import = "java.sql.*"
         import =" com.xatrax.xatrax.vo.*"
    %>
    <body bgcolor="#FFFFFF">
    <table border=0 align ="left" width="800" >
    <tr>
    <td>
         <table border = 2 width="750" align="center" bgcolor="00CCFF" >
              <tr>
                   <td width="50">
                        <center>Aantal</center>
                   </td>
                   <td width="90">
                        <center>Artikelcode     </center>
                   </td>
                   <td width="350">
                        <center>Naam</center>
                   </td>
                   <td width="130">
                        <center>Prijs</center>
                   </td>
                   <td width="80">
                        <center>Lijntotaal</center>
                   </td>
                   <td width="50">
                        <center>Wis</center>
                   </td>
              </tr>
         </table>
         <form>
         <table border = 2 width="750" align="center" bgcolor="66FFF" >
    <% com.xatrax.xatrax.servlets.Bestel bTemp = new com.xatrax.xatrax.servlets.Bestel();%>     
         <% for (int i = 0; i<bestellingBean.size(); i++){%>
    <%
         gProduct prodTemp = bTemp.getProductDetails(Integer.parseInt((String)bestellingBean.get(i)));
    %>
              <tr>
                   <td width="50">
                        <center><input type="text" name="aantal" size="3" >     </center>
                   </td>
                   <td width="90">
                        <center><%=prodTemp.getArtikelcode()%></center>
                   </td>
                   <td width="350">
                        <center><%=prodTemp.getNaam()%></center>
                   </td>
                   <td width="130">
                        <center><%=prodTemp.getPrijs()%></center>
                   </td>
                   <td width="80">
                        <center>test</center>
                   </td>
                   <td width="50">
                        <center><img src="image/delete.gif" width="21" height="20" border="0" /><a></center>
                   </td>
              </tr>
              <%
                   String delete = (String) session.getAttribute("delete");
                   boolean del =("true".equals (delete));
              %>
         <% } %>
         </table>
         </form>
         <form>
         <table border=0 align ="left" width="800" >
         <tr>
         <td>
              <table width="750" border="0">
              <tr>
                   <td width="15"></td>
                   <td width="130"><input type="submit" value="Update aantal" name="update" /></td>
                   <td width="330"></td>
                   <td width="125">Subtotaal incl.BTW: </td>
                   <td width="*"><center>test</center></td>
              </tr>
              <tr>
                   <td width="15"></td>
                   <td width="130"></td>
                   <td width="330"></td>
                   <td width="125"></td>
                   <td width="*"></td>
              </tr>
              </table>
              <table>
              <tr>
                   <td width="15"></td>
                   <td width="130"></td>
                   <td width="330"></td>
                   <td width="125"></td>
                   <td width="*"><center><input type="submit" value="Bevestig bestelling" /></center></td>
              </tr>
              </table>     
         </td>
         </tr>
         </form>
    </td>
    </tr>
    </table>
    </body>
    </html>
    The part that is bold is the link (image) that the user will see.
    When he click on the symbol the row will be deleted.
    The id is giving in the bestellingBean.
    The data for the names of the products will be get from a database.
    Now how can i delete the full row. I now that i need to use the id or is there a simpel way.
    The row will be only deleted in the session, not in the database.
    I dont now how i can delete a full row in a session.
    My idee.
    String delete =(String)session.getAttribute("delete");
    boolean del =("true".equals(delete));
    if(!del){
    Can somebody help me with this.
    Thanx allot.

    from the Vector object? You need to know what row and call the removeElement method on the Vector.

  • How to delete a row in target when corresponding row in source is deleted

    Greetings
    Environment:
    Repository - OWB 10.1.0.4 - going to 10gR2 very soon
    - IBM RS6000 running AIX 5.3
    I have a target table being updated with an INSERT/UPDATE. The user deleted a row in the source table and I want to delete the corresponding row in the target table.
    How do I do this in the map?
    Many thanks.
    -gary

    Thanks very much for the responses. Now that I have thought it through more carefully I see I can still have a single instance of the source table and send it through the MINUS operator with the target table followed by a DELETE into the target table and still have the existing logic for the INSERT/UPDATE into a second occurrence of the target table.
    It won't matter what order OWB puts together the two operations on the target table:
    - if it does the DELETE first the new rows that haven't been added to the target table will come out of the MINUS operator but not be found yet in the target table so not deleted.
    - if it does the INSERT/UPDATE first the newly added rows will not come out of the MINUS operator and hence not deleted from the target.
    Must have been a brain fart.
    Thanks again.
    -gary

  • How to delete a row in ADF Table by pressing "Delete" Key

    I want to delete a row in my ADF table by pressing the "Delete" key..How can i achieve it?

    hai ,
    I write clientListener and ServerListener..But in the script i printed the event.getKeyCode() ...*When i press Delete Key or EnterKey ,it is not printing the value*..
    The code i write is pasted below..
    In the code backing_Comm is my backingbean..Is there any problem in the code that i had written?I want to delete a selected row from my table using keypress Event...pls advice..
    <script type="text/javascript">
    onPressDeleteKey=function(event){
    alert(event.getKeyCode()); // *Here i am not getting the alert, when i press Delete Key or Enter Key..But getting alert when i press A- Z or 1 - 0*
    if(event.getKeyCode()==AdfKeyStroke.ENTER_KEY) {
    var source = event.getSource();
    AdfCustomEvent.queue(source,performDeleteOnPress,{},false);
    </script>
    <*af:table* value="#{bindings.ComMastVO.collectionModel}"
    var="row"
    rows="#{bindings.ComMastVO.rangeSize}"
    emptyText="#{bindings.ComMastVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.CompMastVO.rangeSize}"
    rowSelection="single"
    id="tblCom"
    columnStretching="last" inlineStyle="width:100%;"
    width="273"
    selectionListener="#{backing_Comm.rowSelectCom}"
    binding="#{backing_Comm.tblCom}"
    clientComponent="true" >
    <*af:column* sortProperty="Com" sortable="true">
    <*af:inputText* value="#{row.bindings.Com.inputValue}"
    label="#{bindings.ComMastVO.hints.Com.label}"
    required="#{bindings.ComMastVO.hints.Com.mandatory}"
    columns="150"
    maximumLength="#{bindings.ComMastVO.hints.Com.precision}"
    shortDesc="#{bindings.ComMastVO.hints.Com.tooltip}">
    valueChangeListener="#{backing_Comm.onValueChange}"
    autoSubmit="true" >
    <f:validator binding="#{row.bindings.Com.validator}"/>
    *</af:inputText>*
    *<af:serverListener type="performDeleteOnPress"*
    *method="#{backing_Comm.goDeleteCurrentRow}"/>*
    </af:column>
    *<af:clientListener type="keyPress"*
    *method="onPressDeleteKey"/>*
    </af:table>
    =================================================
    anybody pls help??
    Edited by: Briston Thomas on Jun 3, 2009 2:25 AM

  • How to delete a row in the table in servlets

    I have met a problem in deleting a row in table using servlets.
    My table looks like this:
    ID Name Type
    12 Milienium S
    15 USIA O
    My code looks like this:
    String query = "SELECT * FROM tb_Funds";
    rs = statement.executeQuery(query);
    while(rs.next()) {          
    StdID=rs.getString("FundID");
    StdName=rs.getString("Name");
    StdType=rs.getString("Type");
    out.print("<td><INPUT TYPE=TEXT NAME=
    myName VALUE=" + StdID + "></td>");
    out.print("<td>" + StdName + "</td>");
    out.print("<td>" + StdType + "</td>");
    buf.append("<td>" + "<INPUT TYPE=SUBMIT
    NAME=Delete VALUE=DELETE>" + "</td></tr>");
    There is a delete button in every row. May I know how to delete the row that I want by getting the ID from the table and delete it from the database.
                                       

    Deleting from a table is simple -> delete from tb_funds where id = <value>. Obviously replace <value> with the appropriate ID or use a bind variable (a ?) and prepared statements.
    Are you asking how to pass the id associated with the table row from the browser when the button is pressed?

  • Urgent!! How to delete a row with OrdImage (New)!!!

    I got a problem when I attempt to delete a row that contains a Image in a view object:
    I am using JDeveloper 3.2. And also I use BC4J for my project. I use a web bean to delete a row from a view object:
    For example, the web bean contain the following method "deletePic", the part code is following:
    try {
    JSPApplicationRegistry jr = JSPApplicationRegistry.getInstance ();
    ApplicationModule ei = jr.getAppModuleFromContexts("Testpackage_Test_TestAM", session, null);
    ViewObject s = ei.findViewObject ("PicVO");
    s.executeQuery ();
    if (s.hasNext ())
    s.next ().remove ();
    ei.getTransaction().commit();
    } catch (java.lang.Exception e) {
    System.out.println (e.toString ());
    I simply use the Row remove method to delete a row that contain a ORDImage Field. But I got the following error that is:
    oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Delete": SQL Statement " DELETE FROM TESTTABLE Testtable WHERE TESTID=:1".
    I check for this error only know this error ocurr when try to commit the transaction, but don't know how to solve it....
    pls help me..thx.
    null

    Hi Akira,
    I created a table using the following SQL statement:
    create table timg (id number primary key, image ordsys.ordimage);
    Then I inserted some records. Next, I populated the images in some rows.
    Then, I created a Business Components project. At last, I created a web bean and used this web bean in a JSP page.
    In the web bean, I used your code but modified the applicationId string and view name string to reflect the ones on my machine.
    The JSP ran successfully. The rows were deleted from the table by the web bean. I didn't see the exception. The database I am using is 817, the JDeveloper version is 3.2.3.
    thanks,
    Richard

  • How to delete datawindow row by loop?

    I try to go through datawndow rows by for loop and delete those rows I found with condition.  Something like:
    For i = 1 to dw_1.RowCount()
      if expression then 
        dw_1.DeleteRow(i)
      end if
    Next
    Looks like not working properly. if DeleteRow dynamically change RowCount()? how to resolve this problem?

    If you must go from row 1 to RowCount(), then try this:
    long ll_Row
    ll_Row = 1
    DO WHILE ll_Row <= dw_1.RowCount()
         IF expression THEN
              dw_1.DeleteRow(ll_Row)
         ELSE
              ll_Row++
         END IF
    LOOP
    HTH,
    Manuel Marte

  • How to delete zero rows from a matrix?

    Hi,
    I have a 2D datamatrix and there are some zero rows. My original program should recognize all zero rows and delete them. How to do that?
    I have tried with the Delete From Array function but no success. I also tried with the OpenG array functions but...no.
    I attached a vi which simulates my problem. There is one zero row and I want to delete it and have a matrix without zero rows.
    Kudos for any good help!
    Solved!
    Go to Solution.
    Attachments:
    DeleteZeroRows.vi ‏19 KB

    Christian_M wrote:
    The idea was to give a hint that people try using their brain....
    Stilll, I think your code is fundamentally flawed and will thus lead the student into a deep swamp.
    Have you actually tried it with multiple rows of zeroes?
    Since "delete from array" rearranges the array indices with each deletion, the code will break if there is more than one row to be deleted. For example if a row is already deleted and it needs to also delete the last row, it would try to delete a row that no longer exists. If a later row still exists, it will delete the wrong row.
    Also, since NaN gets coerced to a valid index (2147483647), it's probably not such a good idea. "-1" would be a better choice. (Well, it's an unlikely implossible possibility in LabVIEW 32 bit, but still....)
    I also don't understand your logic with "search array". You need to test all elements for zero.
    LabVIEW Champion . Do more with less code and in less time .

  • How to delete empty row without validation error in ADF Table(EMP)

    Hi Everyone,
    I am using EMP Table in ADF jspx page to insert the data into database.when i insert a row into table by createInsert operation,it inserting the row.But I need to delete that row immediately with out entering any value.
    But it showing some validation error at empno.Is there any ways to delete the empty row?if not,what are the reasons that we can't delete the row.
    could any one tell me the reasons!!
    Thanks in advance!!
    With Best Regards,
    Amar
    Edited by: 973755 on Dec 11, 2012 6:42 AM

    Amar,
    I am little confused with your logic here.....
    but if you are trying to remove the row by clicking Remove button, you can set the immediate property to true and that remove function will run without executing any entity validation.......
    -R

  • How to delete a row in Numbers on iPhone?

    I'm pulling my hair out on this one.  The "Help" for Numbers for iPhone both in-app and on the web states that to:
    Delete a row anywhere in the table: Tap the bar left of the row, then tap Delete.
    So here is what I see before I tap the bar left of the row:
    There is no bar left of the row unless I first tap into one of the cells.  Then, when I tap the bar left of the row, this is what I get:
    I see no "Delete" on which to tap.  Nor do I see "Hide" or "Insert", which, according the the Help, should also be available options once I've tapped that left side bar.  The only things I am able to do with the row are move it up or down, and change its height.
    Am I missing something, doing something wrong, or is this a bug in Numbers?  I'm on an iPhone 5s with auto app updates, so I have the latest version of Numbers.
    Thanks

    Hi Varcar,
    Usually when I tap the bar, as you did, I get a popup menu with some choices. Cut, Copy, Paste then an arrow taht I can then tap to reveal Delete, Hide, Chart. Have you tried to retap on the blue highlight on that bar? It might just want more attention.
    Quinn

Maybe you are looking for

  • Infoset doubt

    Dear Gurus, i have a doubt regarding use of infoset in BI. An infoset consist of , on the left, a DSO containing line items loaded from R/3. On the right is a master data attribute loaded data from a user defined datasource based on a transparent tab

  • Macbook boot up

    Hoping someone can help me with this. I cleaned my macbook keyboard yesterday thinking it was switched off but it was in sleep mode. Later I realised that some of the key letters were not appearing when I was typing n, b etc. I switched off the macbo

  • Download button for Mountain Lion

    Successfully downloaded and installed Mountain Lion from the App Store this afternoon. Under Purchased items in the store it is showing Mountain lion with a live black download button. Apparently the App Store has not recognized the downloading and i

  • Cant get my gift card to work

    hi i bought a 15 dollor i tunes gift card from petro canada in stewiacke and i put it on my iphone and it said that it wasent probly activated and to contact you guys

  • Oracle Database 10g R2, and new topics..

    Hi , it's my first time here and don't know from where to download the course on line for preparing the exam for Oracle Database 10g: Administration I any body know where i can get it from ? Thanks a lots,