Create a dynamic search field

Hi all,
I have created an Odata service. I have created a search field in the ui5 frontend. But I am confused in how do I show the data according to the user will provide data in the search field i.e. I want to create a value help according to the data entered by the user in the search field. How could I do that?
Thanks for your help.
Regards,
Soumya

Hi Soumya,
Below example might help.
JS Bin - Collaborative JavaScript Debugging</title> <link rel="icon" href="http://static.jsbin.…
Thanks and Regards, Venkatesh

Similar Messages

  • Create a dynamic dropdown field in Adobe Acrobat Pro XI

    Hello all. I am trying to create a field in one of my forms using Adobe Acrobat Pro XI. I have a dropdown list of "main" items, and based on what is selected in that list, I want a second dropdown list to give different choices. I have searched and searched and have javascript that I thought might work, but maybe I am have a mistake or I am placing the javascript in the wrong place, becasue it is not working. I know very, very little about javascript, so any help would be so much appreciated.
    I am using Adobe Acrobat Pro XI. I added a "new field", and selected "dropdown". The field name is ProvType. The dropdown options are:
         Inpatient
         Outpatient
         Physician
    I have the "Commit selected value immediately" selected.The field is not validated. The format is "none." There are no actions or calculations associated with it.
    I then created another dropbox, and named it SubProvType. Under Actions, I selected the trigger as Mouse Up, and then selected the Action "Run a JavaScript." I selected the add button, and typed this in the JavaScript editor:
    switch (ProvType.rawValue)
        case "Inpatient":
            this.setItems("Hospice,Hospital,Nursing Facility");
            break;
        case "Outpatient":
            this.setItems("Adult Day Center,Home,Other");
            break;    
        case "Physician":
            this.setItems("Surgeon,Family Practice,Neurologist");
            break;    
    What I want to happen is:
    If "Inpatient" is selected, I want the following options to be available in the second dropdown box "SubProvType":
         Hospice
         Hospital
         Nursing Facility
    If "Outpatient" is selected, I want the following options to be available in the second dropdown box "SubProvType":
         Adult Day Center
         Home
         Other
    If "Physician" is selected, I want the following options to be available in the second dropdown box "SubProvType":
         Surgeon
         Family Practice
         Neurologist
    However.... when I close the form editing and try to select a different option in the ProvType field, the SubProvType field remains blank and there are no options available. There are also no errors.
    I must be missing something, but I have no idea where to start. Thank you in advance for any help anyone can provide.

    dbettis2.... Please understand that everything I am about to tell you is ONLY thanks to the help I received from Gilad D. I don't know if this will help you or not, but I want to try and pass it forward.
    If what you are looking to do is have two dropdown fields, and the second one (concentration) be a list determined by what was chosen in the first one (newMajor) then this will work, if you are using Adobe Acrobat Pro.
    Create a dropdown field and name it newMajor. In the "options" tab. Make sure that you enter all of the items that you want in that list AND that they match the javascript (or this will not work.)
    In this case, I believe you want the initial list to be:
    - Select One -
    BA - Communication (BACOMM)
    BA - History (BAHIST)
    BBA - Business Administration (BBA-BADM)
    After you create the dropdown field and enter all of the options, go to the Validate tab, chose "run custom validation script", then copy and paste the following:
    switch (event.value) {
        case "- Select One -":
            this.getField("Concentration").setItems(["-----"]);
            break;
        case "BA - Communication (BACOMM)":
            this.getField("Concentration").setItems(["- Select One -","None","Mass Communication (MCO1)","Theatre (THEA)","Communication Studies (MC02)"]);
            break;
        case "BA - History (BAHIST)":
            this.getField("Concentration").setItems(["- Select One -","None","Teacher Certification (HIS1)"]);
            break;
        case "BBA - Business Administration (BBA-BADM)":
            this.getField("Concentration").setItems(["- Select One -","None","Supply Chain Management (SCM)","Hospitality Management (HSMG)"]);
            break;
    Then create a second dropdown field, and name it Concentration. Nothing further needs to be done with the second dropdown field (as far as entering options or any javascript.)
    It should work. I have created a form using this code and field structure, and it is working. I hope this helps you, if in fact this is what you were trying to do. (I do not know how to attach a file to this post or I would send you the PDF that I made so you could see the fields. If you message me, I can send it to you.)

  • Create a dynamic search in JSP with more than one datasource

    Hello,
    In the ViewCiteria tag you can specify the datasource in which you want to place the criteria. Is it also possible to work with more than one datasource ?
    In my project I want one query form for specifying criteria for more than one datasource. When I send the query form, I want the right view criteria will be coupled with the right datasource.
    Has someone more experience with that ???
    Thanks!!!

    Hi,
    I think I got the same problem! I tried to combine all the tables in a new view and create a query on this view.
    But when I search and my result has to be one record from the main table, I get this record more than once.
    I tried to use distinct but that does not work because each column has a different value, so the record is never the same.
    I hope someone can help us!

  • Creating a search field on a view

    Hello experts,
    Today is my fiirst day using oracle forms and i have been sitting with it for 5 hrs now and there is no joy at all on my side,
    I have to create a window that is going to enable me to perform some tasks.
    First things first, i have created a view out of 2 tables and managed to display my view on my window :)
    Now i have created 2 datablocks.
    1st datablock is going to display data from my view.
    2nd datablock is going to enable me to update one of the tables that i used to create that view.
    in my first datablock i have to create a search field with a search button, i have manage to get the text field and the button but now i can't seem to find how to link that with my view.
    plzzzz helpppp
    Thank you

    Actually if your data block depends on the database object then F7 and F8 should work. And the code you showed
    we can you but this one is alternative of F7 and F8 and normally we use when we try to open another from from the
    existing form. or if you want to write this code in your exist form then you can write in WHEN BUTTON PRESSED
    trigger. But it will work only for one field because you created only one search field.
    And also answer the previous post? So, can find the better solution then this.
    -Ammad

  • Creating a Better Search Form

    Hi,
    I'm trying to figure out how to create a dynamic search form
    using Coldfusion 8.
    Right now if I enter multiple words in my search field the
    results omit certain records. For example, if I put "toy blue" in
    the search field it will return results that only have "TOY BLUE"
    together and omits any records that only have "TOY" or only have
    "Blue" in the column being searched.
    Is there a way to add the following abilities to my basic
    search code located at the bottom of my post:
    - Search multiple words that are entered in the criteria
    input field.
    - The words can be separated by commas, spaces, or the word
    "and".
    - Have it so you can search multiple word phrases by using
    quotes.
    <!--- Search Form--->
    <form name="myForm" method="post"
    action="results.cfm">
    <p>
    <input name="criteria" type="text" id="criteria">
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <!--- Results Page --->
    <cfquery name="qSearch" datasource="myDatabase"
    dbtype="ODBC">
    SELECT itemID, itemName
    FROM myTable
    WHERE 1 = 1
    <cfif IsDefined("form.criteria") AND
    Len(Trim(form.criteria))>
    and (itemName LIKE '%#form.criteria#%' or itemDescription
    LIKE '%#form.criteria#%')
    </cfif>
    </cfquery>
    <p><b>Results:</b></p>
    <cfoutput query="qSearch">
    <p>#itemid# - #itemName#</p>
    </cfoutput>
    <!--------->
    Any help would be greatly appreciated.
    Thanks
    -C

    This is the relevent sql
    and (itemName LIKE '%#form.criteria#%' or itemDescription
    LIKE '%#form.criteria#%')
    substituting the variable, it looks like this
    and (itemName LIKE '%TOY BLUE%' or itemDescription LIKE '%TOY
    BLUE%')
    You have to treat form.criteria as a list, and loop through
    it.

  • Dynamic Text Field

    I've created a dynamic text field where I've insert into a lot of HTML code.
    Since it's too much long I've used a default scrollbar and simply dropped it onto the field so that It's linked to that.
    When I try it the bar is there but I can just see the upper arrow and the bottom one; the middle part isn't visible and I can't scroll down the HTML content.
    Any idea?

    It's possible it will work in AS3 since I just tried it 1) didn't kick up an error, and 2) worked (using your code, so I don't know what your problem really is).
    That's the trouble with having languages that allow similar things to be coded differently... it can sometimes be hard to tell.  It's bad enough there are usually numerous ways to approach a design.
    If I were setting an autoSize I would be using (based on the help docs)...
    links.autoSize = TextFieldAutoSize.LEFT;

  • How to make dynamic search items in a report?

    Hi all,
    I have two questions.
    1. How to make dynamic search (i.e without GO button) field above report to provide dynamic search by words in one field of report query?
    2. How to make similar multiply dynamic search fields on report to provide individual search by selected fields of report with refine capability (i.e any search conditions in different fields must work together as complex WHERE clause)
    Thanks in advance

    hey yuri--
    if i'm understanding your questions correctly, the easiest way to achieve the functionality you're after is to have your query criteria fields submit the page when values are entered/selected. the page should then branch back to itself using the submitted criteria in the query. because you're asking about dynamically adding in your where clause predicates, you should consider using a report region of type "SQL Query (Pl/sql Function Body Returning SQL Query)". that way you can use pl/sql to piece together your query based on the provided criteria.
    so the part of your question i'm not sure of is when your page should submit itself ("without a GO button" as you said). for your first question, it seems to be a simple matter of javascript. you want users to be able to enter search criteria into a field and have that criteria be using in the report. to facilitate that we have a few self-submitting item types such as "SelectList with Submit" and "Text Field (always submits page when Enter pressed)". for your second question, it seems that you should have a Go button for the user to indicate he's done entering in his query criteria. anyhow, that's up to you, i suppose. hopefully this response will give you the concepts you need to implement this as you'd like.
    regards,
    raj
    ps-after re-reading your post, i now realize there's a chance that you wanted users to not have to submit the page at all when filtering their result sets. if that's the case, you'd have to use javascript for that cumbersome feat. google would be a good place to go for that code.

  • Creating search field for a list component

    i have created a glossary of terms using the list component and populating it via an XML file.
    what i would like to do is create a search field that as the user types in the search bar if there are any matching entries in the list, the focus/selection jumps to that particular item in list. i don't want to clear the list just go to the item that matches.
    i would like it to be predictive so if i have these entries:
    samson
    seek
    seether
    south
    and the user types "s" in the search box to the first "s" entry in the list (samson) is selected, if they type "se" the selection jumps to the first entry with "se" in it (seek) if they type "seet" the selection jumps to "seether" and so on.
    i have absolutely no idea how to do it, but more importantly...is this possible?
    i have attached the sample files that i have been working on.
    thanks in advance

    You need the lowercase. the keyCode of the keybpardevent returns the key's uppercase charcode. So the A-key allways returns 65. Therefore convert keycode to char and to lowercase before appending after what's allready there in the field.
    To have the user not have to type the words with proper casing, convert the label to lowercase before doing the indexOf search.
    import fl.data.DataProvider;
    //-------declare vars----------------
    var firstClick:Boolean=true;
    var loader:URLLoader = new URLLoader();
    var dp:DataProvider = new DataProvider();
    var xml:XML;
    //-------add listeners---------------
    loader.addEventListener(Event.COMPLETE,onLoaded);
    glossary.lb.addEventListener(Event.CHANGE, itemChange);
    glossary.search_bar.addEventListener( FocusEvent.FOCUS_IN, clearbox );
    glossary.search_bar.addEventListener( KeyboardEvent.KEY_DOWN, onSearch );
    //-------functions--------------------
    //clears the input field when the user clicks into it for the first time
    //eliminates the need for them to highlight and delete the "type search here" text
    function clearbox( e:FocusEvent ):void {
        if (firstClick==true) {
            glossary.search_bar.text="";
            firstClick=false;
    //populate description box with definition when item is selected
    function itemChange(e:Event):void {
        glossary.ta.text=glossary.lb.selectedItem.data;
    //creates the data provider for the list based off external XML file
    //arranges the items in alphabetical order
    //populates the list
    function onLoaded(e:Event):void {
        xml=new XML(e.target.data);
        var il:XMLList=xml.channel.item;
        for (var i:uint=0; i<il.length(); i++) {
            dp.addItem({data:il.description.text()[i],label:il.title.text()[i]});
        dp.sortOn("label");
        glossary.lb.dataProvider=dp;
        glossary.ta.text="Please make a selection below";
    //dynamic search engine to locate items in the list
    function onSearch( e:KeyboardEvent ):void {
        trace( e.keyCode );
        var input:String = ( glossary.search_bar.text + String.fromCharCode( e.keyCode ).toLowerCase() );
        trace( input )
        for (var i:uint = 0; i < dp.length; i++) {
            if (dp.getItemAt(i).label.toLowerCase().indexOf(input)==0) {
                glossary.lb.selectedIndex=i;
                glossary.ta.text=glossary.lb.selectedItem.data;
                break;
            } else {
                glossary.ta.text="no matching searches";
    //-------load the xml--------------
    loader.load(new URLRequest("xml/movie1.xml"));

  • Open search-field (STRG+F) and mark words dynamicly

    Hi,
    1.
    an customer wishes to open the search-field which is shown after hitting strg+f automatically when opening his pdf documents. Is there an javascript snippet or some startup options to get this task done? It has to work also in the browser plug-ins of acrobat reader.
    2.
    if the pdf is downloaded via an search form, the customer whishes to mark the searched words in the pdf as if they where searched via strg+f manually.
    Can i do something like this:
    a) write search words as metadata "Stichwörter" (not sure if it's called "glossary words" in the english version of Acrobat) dynamicly in an copy of the file with php. I tried to do this via search+replace with an prepared file - it did modified it as i expect but i destroyed the encoding and the PDF wasn't viewable anymore.
    b) read the "Stichwörter" metadata with an javascript snippet and mark them in the File dynamicly?
    It isn't possible to create the PDF File from scratch easily with the free PHP libs 'cause they are "searchable" Scans of Documents and the OCR recognition isn't perfekt.
    There is an little budget to get this task done. So if i could'nt solve it by myself, my customer would apretiate your offers.
    thx.

    Do a malware check with several malware scanning programs on the Windows computer.
    Please scan with all programs because each program detects different malware.
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
    *https://support.mozilla.org/kb/troubleshoot-firefox-issues-caused-malware

  • When creating a new window in safari, using command T, the marker have not activated the search field. It means you have to click there every time. Changed after upgrading to Mavericks. Anyone knows how to change this?

    When creating a new window in safari, using command T, the marker have not activated the search field. It means you have to click there every time. Changed after upgrading to Mavericks. Anyone knows how to change this?

    Yes, you can do something like that. What you would do is create a button for each image and then hide them. When I do this type of thing I place all of the buttons on a template page and then hide the template.
    You can then use JavaScript to copy the icon from any of the hidden buttons to the main button that you've set up to display the image. For example, suppose you set up 10 buttons named b1, b2, b3, ...b10. The code to copy the icon from one of them to the button used to display the image (b0) would be something like this:
    // Get the icon from the b3 button
    var oIcon = getField("b3").buttonGetIcon();
    // Get  reference to the b0 button
    var f = getField("b0");
    // Set the icon of the b0 button to the icon retrieved from the hidden button
    f.buttonSetIcon(oIcon);
    // Show the b0 button
    f.display = display.visible;
    This code would go in the Mouse Up event of the smaller button.

  • Error while creating a dynamic internal table refers to custom field

    Hi all,
    I am getting the exception TYPE_NOT_FOUND when I try to create a dynamic internal table using:-
    DATA: gr_desc TYPE REF TO cl_abap_typedescr.
    gr_desc = cl_abap_typedescr=>describe_by_name( p_field ).
    The field p_field is a Z-field inside a DB table, (e.g. a user added field in MARA). The statement fails at that point and gives a runtime exception. Any suggestions to how I may solve this problem? Or any alternatives for the same? I guess we face this issue for all custom fields..has SAP released a note for this??
    Thanks..

    that's just the wrong method, you should use DESCRIBE_BY_DATA
    gr_desc = cl_abap_typedescr=>describe_by_data( p_field ).
    Note: DESCRIBE_BY_NAME is to be used for referencing a DDIC type by its name. Example:
    gr_desc = cl_abap_typedescr=>describe_by_name( 'MARA-ZZFIELD' ).

  • How to create a dynamic parameter off a universe field

    Post Author: Summer Frend
    CA Forum: General
    Hello,
    I am trying to create a dynamic parameter in Crystal Reports off my universe field. However the fields appear to all come in as STRING with length 65534 (memo field?). Therefore the fields are not available to choose in my parameter creation box. NOTE: In the universe designer, the field is set as CHARACTER type. I am just trying to make it work with the sample universes that are shipped with BobJ.
    Is there a way in the Universe Designer to make the fields come into Crystal Reports as string fields so that I can choose them as the value for the dynamic parameter in Crystal Reports?
    Thanks,
    Summer Frend

    I'll try again,
    My problem is that I want a dynamic paramater for my Master flow (on START1 activity, so it is something like that : start1.param = select seq.nextval form dual; or from a function GET_PROCESS_ID) but it seems that I must give a permanent parameter it can not be set dynamicaly. I want my flow to be independant of any human intervention. So if it is the first load it does one thing if not the first load it does something else. I can not understand the point of having a parameter (in) that can not be set dynamicaly (looks more like a constant to me, or I'm missing something here). Hope your getting my point.
    Thanks again
    Jacques

  • How to create a dynamic entry list for an input field in VC(ce 7.1)

    Hello all,
    I have an Input field, i need to create a Dynamic Entry List for it in VC(ce 7.1).
    How can this be done.
    Thanks in Advance.
    Thanks and Regards,
    Santhosh Guptha N

    Hi Santhosh,
    You can define Dynamic entry list for Drop down list and combo box but not for input field.
    [Refer this|http://help.sap.com/saphelp_nwce10/helpdata/en/2a/28249060dd4dbc872f6266f4557364/frameset.htm] for defining entry list.
    Let me know if it helped.
    Regards,
    Dharmi

  • ADF query panel with table, adding new search fields dynamically

    I am a beginner very new to ADF world. I have a ADF query panel with table which has its source from a ViewCriteria. I need to add a new search field on the form dynamically based on the user's need. Assume I am using a Employee table and I have search "employee ID" as one field in the form, upon clicking a add button in the form I need to have a another "employee ID" field appears along with the already existing one.
    I tried to add the condition in ViewCriteria but do not know how to add it ?
    Could some one pls address how it can be approached ?

    User, please always tell us your jdev version.
    Well, this use case need some thinking to be done. What do you want to archive with adding a new query field to the panel? As you said you already have one field for employeeId and now, on a click on a button, you add another one. How would the resulting query work with the new field? Should it use 'and' to concatenate the query or should it use 'or'?
    I suggest that you use the ADF Riche Client Demo (http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx) select the Query node and then select 'af:query'. This shows you what is possible otu of hte box using the af:query component. You can add fields to existing queries in advanced mode (e.g. use system query 5, which starts with an empty panel and allows you to add fields).
    Once you understand how this works you may come back with a more detailed use case description or you have found the solution already. Read the documentation on af:query along with trying otu the component.
    Timo

  • Missing Search Field when using 3.1 Create App Wizard ?

    Hi
    2 points which look like bugs to me;
    1 - In all previous versions whenever I used the create app wizard to build up a list of pages, reports always included the 'search across any varchar field' funtionality. This seems to have disappeared when using the Classic form of reports. It is obviously there if you use an Interactive report.
    2 - Again when using the Create App wizard, if I use the Classic form (in order to be able to also 'Generate Analysis Pages') these do get built, but not linked in any way (tab, list region, button etc) to any other pages. I can link them myself, but I am demonstrating APEX here and it doesn't look so good....
    Can someone just quickly confirm I am not going mad here ?
    Jules

    Hi Jules,
    You're not going mad! I've reviewed the behaviour of the Search field and the Analysis Pages link using releases 3.0.1 and 3.1.1, and there is a difference in behaviour between the two versions.
    Classic Reports generated via the Create Application Wizard in 3.1.1 should have a Search text field above the report region, however this field is missing. I've logged bug 7185486 for this issue. Classic Report&Forms generated via the Create Application Wizard, with the "Include Analysis Pages" option selected, are missing a link to the Analysis pages in 3.1.1. I've logged bug 7185486 for this issue. I've updated both bugs with a workaround. A fix for these issues will be available in a future release. Thanks for bringing these two issues to our attention.
    Regards,
    Hilary

Maybe you are looking for