One Search String/Multiple Fields

Hello! What I am trying to do is create a query page for my
users that allows them to enter one search string (var=#string#)
and then click checkboxes that correspond to the field values that
they want to search for the string in (var=#paramSelect#).
Unfortunately I haven't been able to make this work correctly and
was hoping that someone here might be able to help me with this. So
far I have tried the following methods:

Dan, I don't think that I am being clear here (or I have
completely misinterpreted what you are trying to say). The problem
that I am trying to overcome right now is having to put each field
into the statement on my results page. Currently the question of
using AND or OR is not a big problem for me. What I DO want to do
is pass the variable #paramSelect# which contains the values from
each of the checked checkboxes from my search page. These values
are the field names in my DB. When a user selects a checkbox, the
value of that checkbox is being passed to my output via
#paramSelect#, so if one checkbox is checked then I get
#paramSelect# equal to field1. If two or more checkboxes are
checked by the user then the value of #paramSelect# becomes a list
of the values (i.e. field1,field3,field5) - this is the dynamic
part that I am having trouble with. With your suggestion what I am
doing is hard-coding each of the field values into my results page:
AND
form.field1 LIKE '%#String#%'
OR form.field2 ....
when what I want to do is have the values passed from the
#paramSelect# variable, separated from the list, and dynamically
inserted into the code. For example:
say that #paramSelect# is passed and contains the values
field1,field3,field5
I would like to write a loop that will separate each value
contained in #paramSelect#
i.e.(field1) (field3) (field5)
and then build the WHERE from these, allowing me to place
something like my previous example:
<cfif FORM.paramSelect IS NOT ""></cfif>
WHERE 1=1
<cfloop list="#FORM.paramSelect#" delimiters=","
index="i">
AND <cfqueryparam cfsqltype="cf_sql_varchar"
value="'#i#'">
LIKE '%#FORM.String#%'
</cfloop>
The idea when I built that statement was that the values
would be separated when the delimiter was reached (,) stored in the
variable #i# and it would loop through the list contained within
#paramSelect#. Unfortunately it doesn't seem to be doing this
because I get 0 records returned even when I search on just 1
field. My main reason for trying to do it this way is the fact that
this DB is going to grow and the available fields are going to
change. If I can store all of this in a variable and pass that to
both the SELECT, WHERE, and a dynamic output table, then it
relieves a lot of headaches and time going through and changing
code in the future. Currently I have the dynamic SELECT and output
tables built, but the WHERE part of the SQL statement is causing
problems.
Thanks again for your input!

Similar Messages

  • Search in multiple fields

    I have a form an I want to search in multiple fields of same data block,but with OR condition (not AND condition).How can I do this?

    you may needto create a search screen based on a control block containing all these fields you want to search. then construct the string and set the default_where condition for your data block qeury; or pass the string to stored procedure if you based on your query block on procedure.
    e.g.,
    if field1 is not null then
    str := ' OR column1= '||:field1;
    end if;
    if field2 is not null then
    str := str||' OR column2 = '||:field2;
    end if;
    sure you need to have an intial v_where to || to the far left of that str, if nothing, using v_where := '0=0 ';
    str := v_where||str;

  • Customised metadata - search for multiple fields?

    Background: I'm logging a STACK of footage and attempting to arrange it all by a series of different keyword categories (the day the footage was shot, location, camera type, content type, key players, etc). Each category has multiple variables (ie: in the camera category the options are Sony FS700, Canon 5D, Canon 600D, GoPro). I'm adding custom fields via the PPr Project Metadata>Add Property function using a simple Boolean tickbox.
    Question: Is there a way to sort and search the custom fields? For example if I wanted to pull up all the footage shot on day 5, with the Sony, that comprises of interview content with a particular person is there a way to search for all these fields? I've been able to search for one keyword if I tag the material but so far searching and organising by multiple fields has eluded me.
    The long way round is to create multiple bins and/or sequences for each variable in each category by hand, but that's a little tedious and has the potential to bloat the project. Any ideas to solve the problem? I've come from FCP a few months ago so the metadata side of PPro is still something I'm getting my head around. Thanks for reading!
    EDIT: I'm running PPro CC for reference and can install and use Prelude if it helped.

    For the time being I'm using a workaround employing titles above the footage to signify the relevant categories, and tagging significant moments in clips with markers, but it is perplexing.. Premiere seems to employ metadata in a phenomenal way - such that I haven't come across in any other mainstream editor - I just wish it had the functionality to sort and manage all that metadata it is producing beyond the search bar in the Project window.
    Premiere gurus and Adobe affiniados: am I missing something obvious?

  • Using one prompt for multiple fields in a report

    We are using Oracle CRM on Demand, Release 16.
    I have a report I am building that involves four different date fields. I'd like to give the user the ability to enter a date range for the date fields via a Prompt when the report executes. But the date range would be the same for all four date fields. Is there a way to capture the date range in one prompt, but use that same range in all four date fields in the report?

    I recommend to use two dashboard prompts, one for each date field of your range and each will set a presentation variable.
    Then use the FILTER metric function and reference the presentation variable.
    Best Regards,
    Christian

  • Can a Lookup Window be used to search multiple fields w/o clicking Advanced

    In our setup in R18, if a user clicks the magnifying glass to see the Lookup Window, it defaults to searching on one field -- let's say last name. Unfortunately, if they search for a common last name, like "Smith", they may get hundreds of results. Had they used the Action Bar search, they could have used first and last name and gotten much closer to the result they want (if not the specific result they wanted).
    I'd like to avoid having the users click Advanced as: 1) they then have a myriad of fields to choose from, and 2) not everyone will be an expert in using "and" and "or".
    If they could just use the Lookup Window they same way as the Action Bar, I'd be happy. Maybe I have it misconfigured? As it is, when I open the Lookup Window, the drop down shows the same fields I have in the Action Bar, but when I click Advanced, the fields are all blank. That's unlike the Action Bar Advanced link which pre-populates the fields I can search on.

    It is not possible to search on multiple fields in lookup windows without going to the Advanced tab. Your suggestions are valid. Have you considered creating an enhancement request?

  • Search Strings

    HI
    We are using Payment Order and through EBS we clear the vendor open items as after payment run system generate the payment order number but vendor open items remain open. For Bank Transfer BTC is NTRF. But for all the check which are also enchashed at counter bank is also using BTC NTRF. So we have two posting rules for the same BTC. For payment order clearing we are using Algoirtham 029. which is assigned in EBS global setting. To solve above we define the search strings but system is not changing the posting rule as check number coming immediately after NTRF1013.
    Our Check Number is exactly 4 characters. So we define search string like below
    Maping empy
    In search strings use we entered CC, HB, AC then algoritham999 as 029 is not exits then search string target field Posting rule and enter posting rule for check then create another entry in which target field is Algoritham and select algoritham 011 for check.
    Now our file for check is coming like 61:1201230123D10000,00NTRF1013       but system not read this record.
    Just for testing we make another line and like 61:1201230123D10000,00NTRF1013       //1013 and system able to change the Posting rule. No idea why its is behaving like this way
    Please help
    Farhan Qaiser

    Dear Farhan,
    Please create the search string in below way.
    (^ |#| *)NTRF####( *|$) with remaining parameters you have entered, please make sure that you are entering global interpretation algo in search string also.
    Or please check any other text is there to identify check transaction and create a search string for that.
    Regards
    Shanu

  • Search for multiple items in one text field

    Hi all,
    I am new to ApEx, I have a request from one of our users to ask if there is a way we can allow them to enter more than one search items delimited by a comma. For instance, we have a text item field for user to enter some values as emp names, when he key in like PETER,SMITH,ALLEN,WARD, once he submit the page he will see the result as:
    select t.empno, t.ename, t.job, t.mgr, t.hiredate, t.sal
    from scott.emp t
    where t.ename in('PETER','SMITH','ALLEN','WARD')
    Many thanks.
    Message was edited by:
    lcpx

    You can create a multiselect list named P1_REPORT_SEARCH based on a List of Values (LOV) with those employee names and use this code.
    select t.empno, t.ename, t.job, t.mgr, t.hiredate, t.sal
    from emp t
    where
    (instr(':'||:P1_REPORT_SEARCH ||':',':'||ENAME||':') > 0 or :P1_REPORT_SEARCH is null) /**for multiselect**/
    )

  • Multiple Field as a Part of the Single Search

    WOW, Jheadstart is the way to go!!
    Here is a quick question to expedite my learning process if you don't mind since my customer needs to see something in couple of weeks.
    I created a single search screen from a group based on what has been generated by the Jheadstart Designer, but only one field is generated. Now, at this point, is there a way to have multiple field generated or I need to customize the generated JSP or UIX screen? Same things for the methods that are involved, will I need to customized certain Action Class methods to include to two attributes as a part of this search.
    I thank you for your explanations and would greatly appreciate any sample codes available that you can refer to or explain.
    Kamran

    hi,Shalini.
    Using Message directly, you can not achieve what you want easily.
    Instead, i thought out one way, you can judge and check whether it can help you a little.
    You don't use the Message manager directly, that means: don't display your message.
    Now, you have one context attribute named "context_msg" which has type "String".
    In addition, you have defined one Link-to-action UI element  which is bound with the context attribute "context_msg".
    When you get the message, use the following
    message e001(ID) with <variable> into lw_msg.
    or if you use Exception class
    lw_msg = lo_exp->get_text( ).
    Then you can set the context attribute "context_msg" with the "lw_msg".
    Now, you can implement your action handler for the action of Link-to-action as you want, i.e. open another pop-up window.
    I don't know whether it can fit your requirement or not.
    Hope it can help you a little.
    Best wishes.

  • One search help for multiple select-options in webdynpro abap

    Hi,
    I need a way to use one search help for multiple select-options fields. My scenario is :
    I have a table for keeping different organizational units' values of different systems. I have pasted some sample data from this table at the end of this mail. On the screen I want to have 1 select-options filed for werks, and 1 select-options filed for vkorg. (In fact I will have more org. unit fields...) In the beginning of my application the user will select sid.
    If the user selects ADS as SID, when he opens search-help for the first org. unit (werks), he will see the records with SID: ADS, VARBL = $WERKS, LANGU = SY-LANGU.
    If the user selects AGT as SID, when he opens search-help for the second org. unit (vkorg), he will see the records with SID: AGT, VARBL = $VKORG, LANGU = SY-LANGU.
    I have created a search-help taking SIDD, VARBL and LANGU as import parameters; used field mapping and bound this search help to my table. I have created 2 context nodes : org1 and org2 having attributes SID, VARBL, VALUE, LANGU .
    I have assigned related SID, VARBL and Langu values to these attributes at runtime as I needed. That way, if I use input field and reference to the related context attributes org1-value and org2-value2 accordingly, search help works well as I want.
    However, when I use select-options field , I can not bind the field to the context data. I can give reference only to ddic structure. Is there any way to reference to a context attribute? I searched for this in SDN, but could find nothing.
    I think I won't be able to use this way. What do you say?
    As I read from forums maybe using OVS help will be suitable for me. But I have to use one search-help for all select-options fields. Do you know how I can determine the active select-options field and pass its name (for instance "werks" ) as parameter to this OVS search help. (Also I'll pass SID and LANGU.)
    MY TABLE (ZBYYT080) CONTENTS:
    SID     VARBL     VALUE     LANGU     VTEXT
    ADS     $WERKS     1     T     Werk 0001
    ADS     $WERKS     11     T     OZYAS  GIDA URETIM YERI
    ADS     $WERKS     5501     T     BOYA GEBZE FABRİKASI
    ADS     $WERKS     5502     T     BOYA CIGLI FABRİKASI
    AGT     $WERKS     2301     T     KAMLI DAMIZLIK
    AGT     $WERKS     9601     T     PANAR DENIZ URETIM YERI
    ADS     $VKORG     22     T     AA KİMYASALLAR
    ADS     $VKORG     8001     T     İINSAAT BOYALARI
    AGT     $VKORG     6500     T     DAMk St.Org
    AGT     $VKORG     5400     T     PANAR St.Org.
    I wish I'm clear enough..
    I will be gald if someone answers me as soon as possible...
    Thanks İn advance..
    MERAL

    Hi,
    Your ques is how to refer to a DDIC search help to refer to selection screen parameter ?
    Am I right ?
    If Yes, then in the interface IF_WD_SELECT_OPTIONS
    method ADD_SELECTION_FIELD, ADD_PARAMETER_FIELD etc
    have importing param like I_VALUE_HELP_TYPE and  I_VALUE_HELP_ID, I_VALUE_HELP_MODE, I_VALUE_HELP_STRUCTURE
    etc which may help you to link your create DDIC Search help to selection screen params.
    this is just a clue from my side. I haven't tried it myself.
    You can go to the where used list of this method and find some sample implementations which use these params.
    Hope this helps.
    Regards
    Manas Dua

  • Bind multiple fields to one node in data view

    I have a need to have an interactive form where data from a single data source is displayed in multiple fields on the form.  In addition these fields are open for input.  I have bound the multiple fields on the form to one node in the data view.  The data is being displayed in the multiple fields. This form is being routed thru workflow so various agents are updating the form.  The problem that I am having is that the form only seems to allow input in the first field on the form but not the other fields that are tied to the same data source. For example, field A and field B are bound to node SUMMARY.  I can add/change/delete data in field A but not in field B.  After I have done some entry in field A, I can then sometimes make changes in field B.  We have a requirement that field A be enabled for agent #1 but field B is invisible.  Later in the workflow, agent #2 needs to make final changes on a "summary" page so agent #2 had field B enabled.
    Does anyone have any idea how to correct this data entry issue so that data can be entered into either field that is tied to a single node?

    Having multiple fields in the backend is not an option.  I will not go into the business reason in detail but the last page of the form contains a final version of data pulled from various locations on the form where the data on the other pages was input by multiple agents in the process flow.  The last agent in the workflow needs to put the "finishing touches" to the data and should not have to search all over in the form to find the appropriate data fields.
    I have found 2 possible solutions and would like to know if anyone can recommend one over the other. 
    First solution - bind multiple fields on the form to one node in the data view.  This seems to work correctly on the form and data can be entered into either field, with the data being passed back to the webdynpro context in the one node in the data view (corresponding node in WD context).
    Second solution - the node/attribue in the WD context must have the same name as a DDIC element. The node in the data view must have this same name.  The field names on the form must also have the same name.  Define the binding for the field names as Global.  I have not validated that the data is passed back to the WD.

  • How can I create a search plugin for multiple fields

    There are a number of sites that have search capabilities but they require entries into multiple fields.
    One such site is for instance the IBM Employee directory.
    (http://www.ibm.com/contact/employees/servlets/lookup)
    On this site - in order to get usable results - I have to enter both First name and Last name of the employee I'm looking for.
    I created a search plugin for the site, however I wasn't able to split the entered text into two parts and provide them as separate fields for the form.
    Is there a way to do this?
    Regards,
    Imre

    Hi,
    This is excellent. Not search-plugin though but but this is as good as a search-plugin. (Even better, as I haven't seen any solution with the plugins for the problem.)
    I didn't know that it was possible to use javascript as bookmark location.
    Thanks,
    Imre

  • Multiple field validation under one form

    I have one form and in that form i need to validate multiple inputText fields. Each inputText field has its own button for an input assistance that would later populate that particular inputText field. When i click on one of those buttons the entire page (all fields) gets validated. Does this happen because they are all under one FORM? do we have a better way of doing this and does adding inputHidden after each field fix this? im really new at this JSF. thanks.

    If you don't have any required="true" fields, then let your custom validator check which button was pressed by determining the presence of the button in the RequestParameterMap. If your search button has a client ID of for example "formId:searchButtonId", then do something like in the validator:if (FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().containsKey("formId:searchButtonId")) {
        // validate input for search.
    }You can even pass the client ID as f:attribute along the UIInput field if you want.
    The following two articles aren't strictly what you need, but it might give useful background information:
    Action dependent requireness: http://balusc.blogspot.com/2007/12/action-dependent-requireness.html
    f:attribute and validator: http://balusc.blogspot.com/2007/12/validator-for-multiple-fields.html

  • UME user search with multiple search fields (AND / OR search)

    Hi,
    I'm struggling with a UME user search problem. I have multiple search fields: lastname, firstname, department
    Searching in this fields is working with the default IPrincipalSearchFilter.SEARCHMETHOD_AND (default)
    <a href="http://help.sap.com/javadocs/NW04/current/um/com/sap/security/api/IPrincipalSearchFilter.html#setSearchMethod(int)">JavaDocs SearchMethod_AND</a>
    Now I would like to add an additional search field for searching in telephone, cellphone as well. BUT searching for a phone number with searching for one of the other fields should not be a AND search. Is this possible?
    Here is the actual non-working code:
         Vector retVector = new Vector();
         //get Userdata with IUserFactory
         IResourceFactory resourceFactory = ResourceFactory.getInstance();
         IURLGeneratorService urlGen = (IURLGeneratorService)resourceFactory.getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);
         IUserFactory userFac = UMFactory.getUserFactory();                    
         IUserSearchFilter srcFilter = null;          
         try
              srcFilter = userFac.getUserSearchFilter();
         } catch (UMException e)
              // TODO Auto-generated catch block
              e.printStackTrace();
         if(lastName.length() > 0)
              srcFilter.setLastName(lastName + "*",ISearchAttribute.LIKE_OPERATOR, false);
         if(firstName.length() > 0)
              srcFilter.setFirstName(firstName + "*",ISearchAttribute.LIKE_OPERATOR, false);
         if(department.length() > 0)
              srcFilter.setDepartment(department + "*", ISearchAttribute.LIKE_OPERATOR, false);
    //Here I need help!!!!!!! Please advice!!!
         if(telephone.length() > 0)
              srcFilter.setTelephone("*" + telephone, ISearchAttribute.LIKE_OPERATOR, false);
              srcFilter.setCellPhone("*" + telephone, ISearchAttribute.LIKE_OPERATOR, false);
         //if(mobil.length() > 0)
         //     srcFilter.setCellPhone("*" + mobil, ISearchAttribute.LIKE_OPERATOR, false);
         //Set maxium value for Result and thus limit the static variable SIZE_LIMIT_EXCEEDED
         //This method can only be used, if only one search attribute is specified -> thanks SAP
         if(srcFilter.getElementSize() <= 1)
              srcFilter.setMaxSearchResultSize(300);
         ISearchResult srcResult = null;
         try
              srcResult = userFac.searchUsers(srcFilter);
         } catch (UMException e1)
              // TODO Auto-generated catch block
              e1.printStackTrace();
    Thanks for any help...
    Stefan

    Hello,
    I could still need some help. Is there no one who could give me a tip? Could I explain my problem clearly enough or do you need some more information about my problem?
    Or is the search topic with searchFilter not a very common used thing?
    Is there a possibility to do a search in the received search result? Can anyone explain how this would work?
    Any ideas are welcome.
    Regards,
    Stefan

  • Search for multiple words in a field?

    is there a way to search for multiple words in a field? for example, if i have a metadata field called NOTES that contains the string "Joe and Bob created this version on Sunday" is there a way to search for "Sunday, Joe, Bob" and have it return the asset?

    Search using the "Matches Word" option instead of "Contains". That will limit your results to only assets that have a field value that includes all three of those terms. If they are not all included in the same field value, it will not return a hit. So if "Sunday" were in Keywords and "Joe" & "Bob" are in Notes, you would not get a hit for that search with "Matches Word".
    "Contains" searches for the contiguous string in any field on the assets.
    Further, if you add your Notes field to the Metadata Group "Asset Filter", it will appear in your advanced search options, asset subscription filters, and search expired responses. Then you can specifically limit the search to that field and choose from "Matches Word', "Contains", and several other search filters. Note that when you use "Matches Word" this way, you need to eliminate spaces from your comma delimited list of words or you will not get the search hits you want.

  • One Search service application for multiple web applications in a single server

      We are planning to host 17 Web applications in a single Server. Do I need to create search service application for each web application or I need to create one  Search service application , create a Content source for each web
    application and create a Result source for filtering. Which is the best approach. And which approach takes more RAM memory.
       In my application I am using Search web part, "Recently Changed Items", "Popular Items" web parts. when I created only one one  Search Service application for all web applications and using Result sources ,
    I am not getting the results. What could be the problem.

    Hi,
    One SSA is ok, but you should think about access rights. If the access is clear cut between all the web apps you should be ok with one SSA. Multiple result sources limiting on content source also works, but could easily be bypassed.
    Multiple SSA's will eat up RAM/CPU like a mother :)
    As for popular etc.. it could be due to how those sources are set up, but haven't investigated or tested this much.
    Thanks,
    Mikael
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

Maybe you are looking for