A script to remove all rows in the table that contains a specific text

Hello

I tried some old scripts but cannot move to the right solution.

I need a script that deletes all the rows in a table that contains a specific unique word text, something like "xxx".
Someone has an idea?

Thank you

Hello

To remove a line using row.remove () method.

Iterate if table.rows and delete the matching condition.

If we talk about condition, be more specific - what do you mean "a line contains a text:

==> 1st cell contains,

==> any cell contains.

Content of the line whole is an array of his cells.contents, so your text from line 1 is:

rows [0].contents.join ("") ==> string

Jarek

Tags: InDesign

Similar Questions

  • Script to remove all rows from a table except the first

    Please see the screenshots for the question/radio button I'm scripting.  If 'No' is clicked, I want to delete all lines except the first.  Therefore, if the first user clicks Yes, adds a bunch of lines and then click on no, I want all the extra lines should be deleted.  I use the script below, but it removes only half of the lines at a time.  I have to click No. 2 - 3 times to remove all the lines.  Appreciate any help!

    // remove extra rows that may have been added
    var rowCount = Page2.UserList.Table1._RowUserName.count;
    for (var i=0; i<rowCount; i++) {
      Page2.UserList.Table1._RowUserName.removeInstance(i);
    }
    
    

    LCD1.png

    lCD2.png

    Hello

    You can directly use the method setInstances of the instanceManager as follows:

    Page2.userlist.Table1._RowUsername.setInstances (1);

    I hope this will help you!

  • Problem updated 16 rows, it updates all rows in the table

    I tried to update of 16 ranks with AL as the name of divion with the script as below:

    Update wire_center set a.wg_id = '63'
    where EXISTS (select b.div_name from wire_center, title b, area c, ns_workgroups d).
    where B.DIV_NAME =' al ' AND a.dis_id = c.dis_id and b.div_id = c.div_id and d.wg_id = a.wg_id);

    When I run it, it updates all rows in the table.

    However when I run the select subquery, it returns 16 ranks.

    It seems where EXISTS is the problem. If I exist, it gave me error ora-00936.

    How to fix? Need urgent help please. DB is 10g.

    Thanks in advance.

    If I understand correctly what you want, you must not include wire_center once again in the second select (in your clause).
    The second selection has no relationship to the table you're updating, so because select the second returns 16 rows, it is always set to true will. For each line. If all the rows will be updated.

    Instead of

    Update wire_center a set a.wg_id='63'
    where EXISTS (select b.div_name from wire_center a, division b, district c, ns_workgroups d
    where B.DIV_NAME='AL' AND a.dis_id=c.dis_id and b.div_id=c.div_id and d.wg_id=a.wg_id );
    

    Try this:

    Update wire_center a set a.wg_id='63'
    where EXISTS (select b.div_name from division b, district c, ns_workgroups d
    where B.DIV_NAME='AL' AND a.dis_id=c.dis_id and b.div_id=c.div_id and d.wg_id=a.wg_id );
    

    Published by: big on 29-dec-2010 14:27

  • I have a table of the adf, I added a column that contains a button that I created, when I click it must remove this row in the table, but it is not, please help

    I have a table of the adf, I added a column that contains a button that I created, when I click it must remove this row in the table, but it is not, please help

    I don't understand. You use vo and eo for you to use business components.

    Again, this kind of code call in trouble.

    You must post the changes to make them visible to the eo find vo. You must then run the query for the changes in the business layer strips then you must update the iterator he table is based on.

    In your code I see that happen, hooch maybe because it is more often than not formatted and undocumented.

    My advice is to do a small test case that you can manage with easy sql. Once you get it to run transfer you the results to the actual application.

    Timo

  • all rows in the table are not eligible for the specified partition

    SQL > Alter Table ABC
    Exchange 2 Partition P1 with Table XYZ;

    Modified table.

    SQL > Alter Table ABC
    Exchange 2 Partition P2 with Table XYZ;


    P2 Partition Exchange with XYZ Table
    *
    ERROR on line 2:
    ORA-14099: all rows in the table are not eligible for the specified partition

    The exchange partition works fine for the first time. However, if we try to swap the 2nd partition it gives the error.
    How to solve this error?
    How can I find the lines which are not qualified for a specific part. is there a query to find out the same thing?

    >
    Well, exchange of syntax and logic is not clearly as it should (IMHO). There is no element of syntax that tells Oracle we want to Exchange partition data in a table that is not partitioned or not partitioned into partition table data.
    >
    What? Not sure where you got that but maybe it was before you had first cup of coffee? ;)

    An "Exchange", it's just that; an Exchange. Partition data end up in the non-partitioned table and vice versa. It is meaningless and totally obsolete if "we want Exchange partition data in a table that is not partitioned or not partitioned into partition table data".
    >
    It was decided by Oracle not partitioned table control. If the non-partitioned table is empty, it means you want to Exchange data partition in a non-partitioned table. And if not partitioned table is not empty, it means you want to Exchange data in the table that is not partitioned into partition.
    >
    There is no decision to make. The segments are swapped. Oracle doesn't check, know or even care if one or the other or both segments are empty. 'Control' which is carried out (by default except if NO CONTROL is used) only consists of ensuring all the data in the segment intended for the partition belongs to this partition.

    It is what gives the example of John. This can NEVER work if table1 is empty unless p1 is empty at the beginning:
    1 Exchange p1 with table1
    2 Exchange p2 with table1

    As John explains, assuming that no other operations are trying to put the data from p1 P2 which is not possible if p1 actually contains data.

    You can save it for next April 1!

  • Request from oracle to MySql using dblink read all rows in the table

    Hello
    I use the heterogeneous connectivity between oracle 10204 to the Mysql database.
    I have a database of link on the side of the oracle.
    I request a table in MySql with 10 million rows.

    His is not serious if I am running:
    ' Select * from ' CDR_Accounts"@mysql where 'id '= 7675405;
    or
    Select * from 'CDR_Accounts"@mysql;

    There is an index on the column id.
    It seems that the Mysql is feteching all rows in the table, all data is transferred to oracle on the dblink and only after the required lines are back to the client.

    The /etc/odbcinst.ini file is as follows:
    [odbcprd:oracle@odbc /software/oracle]$ cat /etc/odbcinst.ini
    [myodbc3]
    Description             = Mysql connector to mysql version 3.5
    Driver          = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3-3.51.25.so
    Driver64                = /usr/lib
    Setup           = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3S-3.51.25.so
    Setup64         = /usr/lib
    UsageCount              = 1
    CPTimeout               = 3600
    CPReuse         = 
    Please advice

    Thank you

    Initialization of gateway open tha file located in $ORACLE_HOME/hs/admin called init .ora and change HS_FDS_TRACE_LEVEL to HS_FDS_TRACE_LEVEL =WE.

    ATTENTION:
    Do not forget t turn off after all your tests.

  • AF: displays do not all rows in the table

    Hi all

    I have an af table in my jsff and it is bound to a display object. When I run the page locally in my jdev the table af shows all lines present in the ViewObject. But when I deploy the application in our SIT weblogic break page maximum of 25 lines shows if VO has more than 25 lines.

    I put the size of the VO - 1 range. The size of range iterator is empty. I'm naïve why he works in local jdev and does not not in SIT.

    A level of the application or the server parameter influences the number of lines to display in the table.

    Thank you

    Champion

    If it worked before, something had changed on the server. Have you asked your admins if they changed something and if so what?

    They have applied a patch.

    Timo

  • Help to update all rows in the Table with a sequence

    Hi all

    I have a table with the name Report_Status, now we have added a new [Batch_ID] column in the table. The new column takes a value in a sequence. Can someone tell me a normal SQL queries or the procedure for updating each line in turn to an existing table in the value of the sequence? We cannot delete the existing data, must be added for each record batch code.

    example of name of sequence: Report_Status_Batch_ID_SEQ

    Report_Status name and the column name of the table Batch_ID

    Thanks for your time to help out me.

    Kind regards

    Ashish

    Thanks John,

    or I could write as update dept set id = ID_SEQ. NEXTVAL;

    This also works. Thanks for the idea.

  • How do I sort the rows of the table that belongs to the same name and save the .txt file?

    Hello

    I am facing a problem, I read the .txt file that has several lines and columns.

    Third column represents the name of the group, as Group 1, group 2 and group 3. attached .txt file in the annex.

    I wanted to generate the wise group .txt file, as all the raws that 3rd element name group 1 must be in a .txt file and all lines that has 3 name group 2 element must be a .txt file.

    I hope that I explained my problem.

    pelase guide me how can I have the solution for this problem.

    Thank you much in advance.

    Kind regards

    Ankit.

    I have provided a simple example that works.  Feel free to use any method best suited to your needs as there are already several good ideas on this thread

  • Rows in the table LT until merger of all workspaces

    Database 11.2.0.4

    In our environment, we ran a few important updates in the workspaces and then merged these live workspaces.  Up to 25% of the data has been updated in those workspaces.  When these update batch workspaces have been created, previous workspaces exist who are not yet ready for the merger.

    I noticed that the underlying tables of the LT now have about 25% more lines than the live view.  We have now discovered that dbms_wm.refreshWorkspace works really poor.  This statement is used to take seconds or minutes to the maximum, but can now take half an hour or more.

    We recorded a support with Oracle request and provided details of the plan to see if we can get some resolution/advice explaining.

    In the meantime, I have a question for the forum help my understanding of the works of the Manager of the workspace.

    In the example below, I have table "wm_test_table", "test_workspace1" and "test_workspace2".  In "test_workspace1", I update all rows in the table - the table LT now has 2 rows for each record.  I merge 'test_workspace1' live and LT still has 2 rows for each record.  The other lines are not removed until "test_workspace2" is merged and removed.


    SQL> -- Create a test table
    SQL> create table wm_test_table (
      2     id integer primary key,
      3     name varchar2(100));
    
    
    Table created.
    
    
    SQL> -- Insert 1,000 rows
    SQL> insert into wm_test_table (
      2     select rownum, 'before'
      3     from dual
      4     connect by level <= 1000);
    
    
    1000 rows created.
    
    
    SQL> commit;
    
    
    Commit complete.
    
    
    SQL> -- Version enable it
    SQL> execute dbms_wm.enableVersioning('wm_test_table');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- Create two workspaces
    SQL> execute dbms_wm.createWorkspace('test_workspace1');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> execute dbms_wm.createWorkspace('test_workspace2');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- Go to test_workspace1 and update all the rows
    SQL> execute dbms_wm.goToWorkspace('test_workspace1');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> update wm_test_table set name = 'after';
    
    
    1000 rows updated.
    
    
    SQL> commit;
    
    
    Commit complete.
    
    
    SQL> -- Check how many rows in wm_test_table_lt - we expect 2,000 as we haven't merged yet
    SQL> select count(*) from wm_test_table_lt;
    
    
      COUNT(*)
    ----------
          2000
    
    
    SQL> -- Merge and remove test_workspace1
    SQL> execute dbms_wm.goToWorkspace('LIVE');
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> execute dbms_wm.mergeWorkspace('test_workspace1', remove_workspace=>true);
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- Check how many rows in wm_test_table_lt
    SQL> -- I'd hope there'd only be 1,000 but there is 2,000
    SQL> select count(*) from wm_test_table_lt;
    
    
      COUNT(*)
    ----------
          2000
    
    
    SQL> -- Let's see if compressWorkspace will get rid of them
    SQL> execute dbms_wm.compressWorkspace( -
    >       workspace => 'LIVE',   -
    >       auto_commit => true,   -
    >       remove_latest_deleted_rows => true);
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- They're still there
    SQL> select count(*) from wm_test_table_lt;
    
    
      COUNT(*)
    ----------
          2000
    
    
    SQL> -- Now merge test_workspace2
    SQL> execute dbms_wm.mergeWorkspace('test_workspace2', remove_workspace=>true);
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> -- and the additional 1,000 rows are removed
    SQL> select count(*) from wm_test_table_lt;
    
    
      COUNT(*)
    ----------
          1000
    

    Is it possible to safely remove the extra lines in LT without waiting until we merged the workspaces that existed before the update batch has been done?  I hope that it will so improve the performance of refreshWorkspace.


    I thought that something like this can do, but it does not remove the other ranks, is:

    execute dbms_wm.PurgeTable(
     table_id => 'test.wm_test_table', 
     archive_table => null, 
     where_clause => 'id not in (select id from test.wm_test_table)', 
     instant=>null, 
     workspace => 'LIVE', 
     purgeAfter => false);
    

    This question is similar to

    Lines left in the table LT after removal of the direct workspace and the removal of all workspaces

    and

    How to delete soft deleted records?

    but I'm still not sure.

    Thank you

    John

    Hello

    This behavior is expected and it is due to the test_workspace2 workspace.  A compression operation will not allow compressed range to include a backup implicit point that is created for a child workspace.  This is done to preserve the integrity of this workspace.  The initial 1000 lines are all lines that are visible from test_workspace2.  Removal of these lines would leave test_workspace2 will 0 lines in there.  Lines 1000 updates are the lines that do not appear on LIVE.  So, given that the two sets of lines are needed, none of the lines can be deleted physically.  A compression operation will never change the view of data for any workspace.  It only removes the unnecessary records.  The two options in order to be able to compress these lines is to either delete (as you did) or refresh test_workspace2.  The refresh operation would move the implicit savepoint for the workspace to a version that isn't after all 2000 lines in the table _LT and allow the dressing to remove first half of them because they are no longer needed by any child workspace.

    With respect to the performance of RefreshWorkspace, I would need to see a trace of the transaction file.  But who should rather get through the SR you filed.

    Kind regards

    Ben

  • deselect all rows in af: table in the adf.

    Dear all,

    I have af:table with activated single selection. When the page is initially loaded I want all rows of the table deselection... so, how can I achieve this?


    Thank you.
    Kind regards.

    jdev version 11.1.1.4.0

    Remove the attribute according to the definition of af: table when a display object is instance fell into the page in a table:

    selectedRowKeys = ' #{bindings. " Employees.collectionModel.selectedRow}.

    The example of table definition should look like:


    lines = ' #{bindings. " Employees.rangeSize}.
    emptyText = "#{bindings." Employees.Viewable? "{'No data to display.': 'Access Denied.'}".
    fetchSize = "#{bindings." Employees.rangeSize}.
    rowBandingInterval = '0 '.
    selectionListener = "#{EmpTableBean.onTableNodeSelection} '"
    rowSelection = "single" id = "t1" >

    The following code can be used to get the selected node - after the user selects a node:

    {} public void onTableNodeSelection (SelectionEvent selectionEvent)
    resolveMethodExpression ("links. Employees.collectionModel.makeCurrent} «»
    NULL, new class [] {SelectionEvent.class},
    (New Object() {selectionEvent});
    Object richeTableau = (RichTable) selectionEvent.getSource ();
    Line line = null;
    {for (object facesRowKey: {object.getSelectedRowKeys ())}
    object.setRowKey (facesRowKey);
    Object o = object.getRowData ();
    JUCtrlHierNodeBinding rowData = o (JUCtrlHierNodeBinding);
    line = rowData.getRow ();
    }
    System.out.println (Row.GetAttribute("FirstName"). ToString());
    }

    public Object resolveMethodExpression (String expression, class returnType,
    Class [] argTypes,
    Object [] argValues) {}
    FacesContext facesContext = FacesContext.getCurrentInstance ();
    Application app = facesContext.getApplication ();
    ExpressionFactory elFactory = app.getExpressionFactory ();
    ELContext elContext = facesContext.getELContext ();
    MethodExpression methodExpression =
    elFactory.createMethodExpression (elContext, expression, returnType,
    argTypes);
    Return methodExpression.invoke (elContext, argValues);
    }

    Thank you
    Nini

  • ADF: Double in taskflow Page Navigation click on the row in the table on the page .jsff

    Hi all

    My 11.1.1.7 Jdev.

    I have a taskflow with two fragments (.jsff) pages. On the first page, I have a table when I double click on the row in the table that I want to go to the next page.

    I tried to call java script but I do not understand. How can I get it?

    handleNavigation is the only thing that you should not use in the adf. Read 'How to navigate in the stubborn workflow' in this http://www.oracle.com/technetwork/developer-tools/adf/learnmore/nov2010-otn-harvest-190744.pdf.

    Timo

  • Rows in the table are break on separate pages...

    I have 20 lines equipped table:

    first 3 lines are on one page, then half of the page is empty hen remaining 17 rows is on the second page.

    How can I keep table to break the lines. I want all rows in the table to succeed himself.

    Help, please. Thank you.

    Keep them with parameters are in the table > Format > Format line...

    Note: the first row on the second page may also have a start parameter that indicates that it is at the top of a page or column.

    The control of widows and orphans just specifies how many rows to keep together (widow is the first page; ( orphan , is the second page) when a table has over a page. The higher the number, the more lines are forced to remain together.

  • Delete multiple rows in the table.

    How to remove several rows in the table at the same time?

    I have a table with 10 rows.

    I have a loop for delete lines 1, 3 and 6.

    It deletes the row 1 and 3 of the Index out of Bounds exception.

    I know why this is happening.

    I'm looking for a function or something to delete several lines at once?

    Thank you

    It must be a logic error.

    For each row, you delete, you should reduce the number of indexes.

    For example

    If you want to delete lines 1, 3 and 6 of a table that contains 6 rows

    Remove row1 as Table.Row [0].instanceManager.removeInstance ();    [now how many lines will become 5]

    Remove row3 as Table.Row [1].instanceManager.removeInstance ();     [Note that index is 1 because you have already deleted a record, and the index starts at 0.

    Remove row6 as Table.Row [3].instanceManager.removeinstance ();      [already two deleted record, so 6-2-1 = 3 is your index to remove]

    You understand the logic?

    Nith

  • Add the number of rows in the table on the Page Framework OA

    Hi all

    I need to add a line at the bottom of a table in the OA framework to display the number of lines for the underlying table VO. Can someone point me in the right direction to get there?

    Thanks in advance!

    Kristopher

    Hi Kristopher,

    As directed by your post, my understanding is that you want to have a line at the bottom of the table that contains a field that displays the number of rows found in the t... RT?

    You can implement the same in the following way,
    You can add a footer to your table and add a messageStyledText point in it. At this point, you can assign the value of VO.getFetchedRowCount ().

    Hope this is what you are looking for.

    Kind regards
    REDA Papdeja

Maybe you are looking for

  • Missing files - notes

    My 6 Iphone turns off suddenly, and when I turned it back on all my notes files had disappeared. I tried to use several extractors file via my computer, but none of them worked. I also asked a guy at the apple store had no idea of how to help. Anyone

  • On windows 7 I find difficulty posting a few links on my site

    When I connect to my website www.xowned.com and when I try to enter user name and password, everything works well under win xp, but it does not show me my admin links in Windows 7. Here's the code in Admin Section in unordered list <li class="menu">a

  • Locked account.

    I contacted the Support of Skype to solve a problem with my Microsoft Account does not link/unlink properly, probably a bug in the system... so what do? Lock me out my account * beep * permanently. I can't make a new account, because I have contacts

  • Windows PCIe device driver problem. Windows hangs on the reception of the PCIe interface data.

    I am writing a the PCIe device driver. With the PCIe, I have a connected storage device. I assigned a buffer in memory using malloc() which I use to transmit data to and receive my material. In my hardware, I have a DMA which uses physical addresses

  • Implemented new XPS 15 - remove bloatware?

    Hi could someone please refer me to a FAQ or an article with suggestions on the removal of unnecessary software to a new laptop.  First to go will be McAfee - is there other things people recommend remove? TIA