Search the text in the table block

I have a block temp table with 2 columns
1 code
2 description
more than 500 discs in this table
It's only to see
When the form opens, run the query and display all the records in the form.

in this form

a single point text findtext
a search button

I want that when I enter text in findtext and click on the Search button
he go to the temp block and display the records with the text I entered (as we see in LOV)

example of
Records of SONY ERICSON more then 5
When I enter findtext Sony and click on the search button then it will display all recording Sony Ericson.

I m using this code but it happens when I write full "Sony Ericson.
 
go_block('temp');
first_record;
loop
if :temp.description = :findtext then
exit;
elsif :system.last_record = 'TRUE' then
message('No matches found');
exit;
else
next_record;
end if;
end loop;
     

Instead of checking with operator =, use

If instr(:temp.description,:m_findtext) > 0 then
...............

For you to check, the following code you can find correspondence records anywhere / a field in the block,
as write code to a button that is placed in the same block, number of points displayed as 1.


Declare
m_item varchar2(60);
m_cur_rec varchar2(10);
m_found number :=0;
m_cursor_blk varchar2(30) := 'myblockname';
/*:m_find is the findtext field*/
Begin
     if :M_FIND is not null then

        if m_cursor_blk is not null then
              go_block(m_cursor_blk);
              go_record(TO_NUMBER(:system.cursor_Record)+1); 

              loop
               m_item := get_block_property(m_cursor_blk,first_item);
               loop
                    exit when m_item is null;
                    if get_item_property(m_cursor_blk||'.'||m_item,item_type) = 'TEXT ITEM'
                          and get_item_property(m_cursor_blk||'.'||m_item,visible) ='TRUE'
                          and get_item_property(m_cursor_blk||'.'||m_item,enabled) ='TRUE'
                          and instr(name_in(m_cursor_blk||'.'||m_item),:m_find) > 0 then
                                  m_found := 1;
                                  go_item(m_cursor_blk||'.'||m_item);
                                  exit;
                                 message( instr(name_in(m_cursor_blk||'.'||m_item),:m_find));
                    end if;
                    m_item := get_item_property(m_cursor_blk||'.'||m_item,nextitem);
               end loop;
               exit when :system.last_Record = 'TRUE' or m_found = 1;
               next_record;
              end loop;
        end if;
     end if; 

     If m_found = 0 then
            go_record('1');
                                 message('Text Not Found');
     end if;
end;
 

Published by: Dora on December 21, 2009 11:10

Tags: Oracle Development

Similar Questions

  • Create and search the tables and apply the style

    Hello

    I am very new to scripting. I want to learn the basics like creating a table, creating anchored frames, frames of related texts, etc..

    Now, I want to create/search tables in a document, and I want to apply styles. I saw a script to do this. When I paste the Extendscript CS4 script, as the program crash.

    The crash of the program in part 1. When I create another script with only part 2 (see //part 2) then there is no problem.

    What I've done wrong? And can someone tell me what part 1 of the script do?

    Thank you

    Part 1

    using your version; I prefer return 0 if table not found
    function findTable (obj) { }
    while (obj.constructor.name! = 'Table') {
    obj = obj.parent;
    if (obj.constructor.name is 'Application') {
    throw 'Can't find table'
    }
    }
    return obj
    }

    Part 2


    var myTable = 0;
    if (app.documents.length > 0 & & app.selection.length > 0)
    myTable = findTable(app.selection[0]);

    check at least enough lines for 1 row from the top, 1 body line, row 1 down
    if (myTable! = 0 & & myTable.rows.length > = 3) {
    / / remove all the rules; INSET value 0
    myTable.cells.everyItem () .appliedCellStyle = "[None]";

    / / format row down
    / / (do not forget the lines use count 0-base)
    a = myTable.rows.length - 1;
    myTable.rows [a].cells.everyItem () .appliedCellStyle = "" 4.cell_body_last"";

    / / format stored
    first = 1;
    last = myTable.rows.length - 2;
    for (a = first; has < = last; ++ a)
    myTable.rows [a].cells.everyItem () .appliedCellStyle = "" 3.cell_body"";

    / / format the top row
    a = 0;
    myTable.rows [a].cells.everyItem () .appliedCellStyle = "" 2.cell_header"";
    }

    Part 1 provides that the text cursor to be anywhere inside of a table - in ordinary text, either with a cell, row, column or all of the selected table.

    He walks 'up' with his mother until he comes to the purpose of the table itself.

    This will work only if the text cursor is anywhere within a table. It does nothing when you're somewhere else, and it only works with the table 'ongoing'.

  • How to search the table with margins?

    Hello!

    I have a signal that I admire from a PXI-5600 and store it in a table. What I want to do is to find the top of the signal (which I did successfully) and then calculate the bandwidth.

    What I do now, is to take the peak value and calculate 20 dB, so I use the "search of table 1 d' but I get index - 1. My guess is that this is happening because of this doesnat table contain EXACTLY the calculated value.

    Can I search somehow in the table for the values around one calculated?  For example; If I calculated the 10.08 value I want to search all between 9, 9 - 10.1.

    so I wonder how I can trace these points whith a line between them in my diet already spectrum


  • to search the table

    I have a column and I need to find the table in which the column is present.
    Suppose that there are 500 tables in the s1 schema.
    version Oracle 11 g

    Hello

    Try the following:

    SELECT table_name FROM dba_tab_cols
    Owner WHERE = "s1".
    AND column_name = 'MY_COL_NAME ';

    Published by: 961345 on 25-sep-2012 15:14

  • We can search for text in a table?

    Hi people,
    I need to search for a text within a table.for ex, I need to find a word "ABEL" in a table.but I n don't know real field names in a table.without using DESC I should look for a string.that is that I should get the names of columns to runtime.for ex,'select * from emp where column_name as
    'ABEL % %';
    Here, this column_name value should be replaced by a select another statement.is it possible? can u suggest me? using oracle 9i.

    Concerning
    VIDS

    If it's just for a table, probably quite simply, I would opt for something like

    SQL> col search_word form a25
    SQL> col column_name form a25
    SQL> col text form a25
    
    SQL> var search_word varchar2(50)
    
    SQL> exec :search_word := 'al'
    PL/SQL procedure successfully completed.
    
    SQL> select  t.column_value.getrootelement() column_name,
            :search_word search_word,
            extractvalue(column_value, '*/text()') text
      from  table(xmlsequence(xmltype (
                                  cursor (select   * from dept)
                               ).extract ('ROWSET/ROW/*'))) t
     where lower(extractvalue(column_value,'*/text()')) like '%' || lower(:search_word) ||'%'
    /
    COLUMN_NAME               SEARCH_WORD               TEXT
    ------------------------- ------------------------- -------------------------
    LOC                       al                        DALLAS
    DNAME                     al                        SALES                    
    
    2 rows selected.
    
  • Help with a script to search for text in a table cell and apply the cell style

    Hello

    I build the script which Jongware wrote in his post here http://indesignsecrets.com/tackling-tables-through-scripting.php - I am trying to create a variable in which I can add a number of different parts of the text, in this case it's different parts of the United Kingdom i.e. 'London', 'East', 'Scotland' etc. I just need the script to apply the cell Style - 'District Cell' - to any cell that contains text in the variable. Here's the script, if anyone can help I would be grateful.

    function checkWhichTable()
    {
    // ensure the user made a selection
    if (app.selection.length != 1)
    return null;
    var currentTable = app.selection[0];
    if (currentTable.hasOwnProperty("baseline"))
    {
    currentTable = app.selection[0].parent;
    }
    while (currentTable instanceof Cell || currentTable instanceof Row || currentTable instanceof Column)
    currentTable = currentTable.parent;
    if (!(currentTable instanceof Table))
    {
    // No table selected
    return null;
    }
    return currentTable;
    }
    app.doScript(checkUserSelection, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Process Table");
    
    
    function checkUserSelection ()
    {
    var a_table = checkWhichTable();
    if (a_table == null)
    {
    if (confirm("No table selected. Do you want to process *all* tables?") == false)
    return;
    allTables = app.activeDocument.stories.everyItem().tables.everyItem().getElements();
    for (aTable=0; aTable<allTables.length; aTable++)
    {
    processTable (allTables[aTable]);
    }
    } else
    {
    processTable (a_table);
    }
    }
    function processTable(table)
    {
    // do something here!
    
    
    //Find Text in Cell and apply Cell Style
    var textInCell=['London', 'Scotland', 'South West'];
    for (i=0; i<table.cells.length; i++)
    {
    if (table.cells[i].texts[0].contents==textInCell)
    table.cells[i].appliedCellStyle = "District Cell";
    }
    
    
    
    
    }
    

    Hello

    Change this feature:

    function processTable(table)
    {
    //Find Text (exactly as it is) in Cell and apply Cell Style
    var
      textInCell=['London', 'Scotland', 'South West'],
      mFound, cFound;
    
    app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^(" + cities.join("|") + ")$";
    mFound = table.findGrep();
    while( cFound = mFound.pop() )
      cFound.parent.appliedCellStyle = "District Cell";
    }
    

    Jarek

  • How to find / search the text in a table of data displayed in adobe flash player?

    I have a table of data displayed on the browser, but with Adobe Flash Player UI technology. CTRL + f does not work on the table to find a specific word in the table.


    What are alternates, you ask? or all the other shortcuts are available to search or search the text in such a case?

    Thank you.

    There is no good workaround solution.  The developer would have needed to implement a similar feature in their Flash application, or they would have needed to use StageText (which essentially exposes the native textfields), but it seems that they have neither.  The HTML TextField is certainly more robust and functional of the Flash, and honestly, HTML is probably a better choice of technology for what you describe.

  • Search any text in the filter of the columns on the table of the adf

    Hello
    I have the filter on adf table columns where I can search any text beginning by default.
    For example you gave, my name is sam you can search filter for table of my column and you get the results, my name is sam
    but I want to search by any word we will tell sam and I want to show the same result.

    Thank you
    Savan Shah.

    You can probably use wildcards (% and _)
    for example % my %

    Dario

  • Is it possible to place the table and the text online?

    Hi all

    I have a table need to align with the numbered list. Is it possible in line of the table and text on a single line. EX: 6.12 and top of the 'text' must align horizontally.

    See the screenshot of the problem.

    Currently what I do, it is to place the table in separate frame and place it online using the option of the anchor.

    Screen Shot 2016-08-30 at 1.20.22 PM.png

    Thanks in advance.

    Kasi

    We could use the options for text blocks to position the first line.
    Fixed value set to 0.

    And a table style that would govern the distance before and after a table.
    If you wish, set both values to 0 .

    We could also do a minimum in the lead with the paragraph formatting to separate paragraph following with the next table.

    Best,
    Uwe

  • Wrap text around a table in the same period, possible?

    Is it possible to get the text to wrap around a table, without having to make the array in its own framework (as a separate object)? Of course the table would have its width less than the width of the text block, enough so that the text could flow into the empty space next to it (see photo).

    sample text wrap.jpg

    It is my intention to do them in the same frame so that she would follow the traffic whenever there are changes. I know that I can use the anchored object tool, but it has its limitations (which must be on the same page as - and - below the insertion point). When I do a report with sequential numbering - as in this case the notes, table and figures, etc. - and correctly generate a table of contents (to be in order) depends very much on the position of each element (even the location of the insertion points). If an item is in the same frame, or as a separate object, affects the sequence. Even notes must be in the same continuous framework to work correctly.

    From the point of view of InDesign, a table is just a text character, although it still occupies a full range in itself. You cannot add wrap at a table, only a framework containing.

  • Is no longer, I can choose any text, images or tables that I put in a landscape master page that has a different text than the rest of the document stream.

    I tried to follow these steps to set up a master page to landscape:

    http://blog.rockymountaintraining.com/Adobe-FrameMaker-adding-a-landscape-page-to-a-PORTRA TI-document.

    After experimenting with these options, I choose is no longer any text, images or tables that I had put in my new master page of the landscape. The content is somehow now on another layer that I can't.

    Any ideas on how to recover my content?

    Have you added [another] master block of text to the page? If so, you may have placed one above the other. Try to select the main text block and move it slightly to see if you have another below it [who is probably your content].

  • Search for text in all the labels in a Panel (like Ctrl-F)

    Hello

    I have a panel where I set some preferences for the application. He ara on 200 preferences. (a preference is a JLabel more a textfield/combobox/box)

    I would like to know if someone has implemented something like Ctrl-F in browsers. The research should go through all the labels and highlight the labels that contain the text.

    Thank you.

    You can use the getComponents() method to get all the components added to the Board. Browse the table and check if the current one is a JLabel instance. Then check the text in the JLabel and compare it with the search string. If necessary label highlighted (for example by changing the color of the text or add or remove line border color). Then, you can use the limits of the JLabel to make it visible in a parchment (if any).

  • The table text align to baseline grid

    Hi all

    I have a heavy text document for which I have implemented a basline grid that works very well, except when I have to put in some simple text tables, because the text inside tables is not aligning to the grid... and I can't work out why.

    Any thoughts? I use CS6 if that helps.

    I think that the problem might have been that I put tables in the entire flow with all other texts. I've separated the tables, put them in a new block of text and now it seems to work... a bit of a chore, but it's the only way I can make it work.

    Thank you guys for your help and advice.

  • How to use the search bar 'Find' in the table of contents to find the script FULL of my course?

    Hello

    My project contains voice narration with the support of chips. Start-up option "find" in the table of contents looks only bullets of text on each slide to specific words. Is there a place I can insert the full script (rather than the abbreviated chips) spoken by the narrator in my class so that the option "find" search in these words?

    Thank you!

    Hello!

    Captivate, in fact the finding of OCD to retrieve and search for the text content of slide and slide labels usage.

    What you can do to get your full script to work.

    (1) add a text caption slide.

    (2) paste is your complete script. (From slide notes)

    3) go to properties of legend text-[disable] option which does not show in the output.

    In this way, you would have all your content on the slide to search for in the table of contents, but still not visbile to users, they would continue to see the short balls.

    I hope this helps.

    Thank you!

    Anjaneai

  • Error JavaScript prevents the table of contents, Index, search view

    I produced my RoboHelp HTML project webhelp and got an error javascript (this.maCom [...] (' is null or not an object) when you view the result. See the full error text below. So the table of contents, index and search are not displayed. We'll find the javascript error in the status bar of the browser that says "error on page". I found that if I saw the result of robohelp, the browser that launched shows the table of contents, index and search, but has a security warning about a restriction of running scripts or ActiveX controls. However, when I move the generated webhelp on my production server, the help doesn't have the security warning, but produces the error so that the table of contents, index and search do not show. I had done the same process to generate webhelp about 8 months ago but had no error whatsoever. In fact, this version is still in production and works very well.

    In my search for the problem, I found that it is the same error as message of the forum 4063663 (http://forums.adobe.com/message/4063663). I didn't have a second system with RoboHelp to be able to get other whphost.js, however, I have diff had the file generated with that found in template_stock and found only two different lines. These differences were only to replace a couple of variables with static text so I do not replace this file will solve any problem for me. That is the message of only forum I could find who addressed this issue.

    I was originally on RoboHelp 8.0.0 when I first encountered the problem, but has expanded and patched to version 8.0.2 and still had the same problem. I even created a new simple project. Once I moved the simple project on the production server, it also would display the table of contents, index and search.

    The strange thing is that only 8 months ago, I used the same process to generate webhelp without any errors (on 8.0.0). The only thing I can find is there is a Windows XP patch which affected the generation of webhelp. Furthermore, I also tried chrome and also produces the error.

    I don't know what is causing this problem or how to solve the problem. Anyone have any ideas?

    Versions:
    RoboHelp 8.0.2
    Windows XP
    IE 8.0.6001.18702CO
    Chrome 18.0.1025.168 m


    JavaScript error
    -------------------------
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0 .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729;. MS - RTC LM 8; InfoPath.2;. NET4.0C;. NET4.0E)
    Timestamp: Sun, may 2, 2012 16:32 UTC


    Message: Object EXPECTED
    Online: 344
    Char: 2
    Code: 0
    URI: http://server1/robohelp/whphost.js


    Message: 'this.maCom...' is null or not an object
    Online: 171
    Char: 3
    Code: 0
    URI: http://server1/robohelp/whphost.js
    --------------------------

    After further research and testing, I found the update of security for RoboHelp 8 and 9 (http://www.adobe.com/support/security/bulletins/apsb11-23.html) posted as an ad that I had not seen before. I used the feature updates of the product, but that said I was informed and did not include this update.

    Both javascript in this update files solve the problem. The table of contents, index and search now appear.

    Update:
    As I studied the problem further (when writing this reply), I found files that are newer than the latest security patches, I was aware of that. In addition, I discovered that my security organization decided to patch with APSB12-04 I don't know. This patch is why my 8.0.0 installation magically stop working. I see the announcement of the security, the bulletin was not all the required components for specific, that the patch can be applied to 8.0.1 and 8.0.2). (8.0.0, Adobe, please give more information on the ballots of so that organizations that deploy auto will be forced to find out what is running before the update. Information such as whether they apply to all versions of Robohelp 8 or simply a specific version. If APSB12-04 was supposed to apply to all versions of 8, then it did not work. In fact, he broke my installation of 8.0.0 for the generation of webhelp, but a later installation of 8.0.1 and 8.0.2. It seems that they have done a better job for APSB11-23. Maybe the security updates should be a kind of service pack that has a plant and a cancellation process. Right now, my security organization has replaced the files based on the specification in the security bulletin.

    I'll try to patch with APSB12-04 new since I've updated version 8.0.2 database to see if I still have the webhelp. If I can't view the table of contents, I have to take off once more and be 'in non-compliance."

Maybe you are looking for