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

Similar Messages

  • Automatic KM search with no input field and no "Search" button

    Hello,
    I would like to make an automatic KM Search ( a kind of iview that when it loads it doesn´t show the input query field, it just shows the results of a hardcoded query string, with no need of pressing the "Search" button).
    I tried to do it passing parameteres to a com.sap.km.cm.basicsearch , for example:
    "ConfigFileName=Navigation.xml&StartPage=SearchPage&Validate=false&QueryString=MARADONA&layoutSetMode=exclusive "
    but :
    1- you have to push the "Search" button to see the results
    2- it shows the input field, so user will be able the change the string.
    Any suggestions? Thanks in advance.

    Removing the input field is slightly more complex.
    1) Duplicate the UISearch Options set (from System Admin,System Config,KM, CM, User Interface, Search, Search Options Set)
    2) In your duplicated Options Set, Show Advanced Options. Deselect the option to "Enable Further Search After Quick Search". Additionally, you might want to disable some if not all these options.
    3) In your search iView, set the Search Options Set parm to the name of the Option Set you created in step 1.
    Hope this helps.
    Regards,
    Frank Nacy

  • Couldnt work with multiple key fields in keyword search

    Hi,
    I have some issue while working keyword search uder free form search in datamanager. in my repository i have two keyfields name(default field) and nation(lookup flat). but while working with keyword search if i pass any value that is comparing with only the values under keyfield name not comparing with other keyfield nation values. i am working with MDM 5.5 sp6. It would be appreciable if any one solve this issue.
    Regards
    Ravi

    Hi Ravi,
    If you want to perform Keyword search for Nation field as well without changing it's field type; then plz follow these steps:
    1. Set the Keyword property for Nation Field as Normal in Main table.
    2. Now go to the lookup table to which Nation field is looking into (say the Lookup table name is Nations).
    3. Now set the Keyword property for Nation field as Normal in the lookup table (Nations table) as well.
    4. Go back to Main table and now perform Keyword search. This time it will perform the search on both the fields (i.e., Name as well as Nation).
    Please let us know, if problem still persists.
    Regards,
    Varun

  • How to search with multiple constraints in the new java API?

    I'm having a problem using the new MDM API to do searches with multiple constraints.  Here are the classes I'm trying to use, and the scenario I'm trying to implement:
    Classes:
    SearchItem: Interface
    SearchGroup: implements SearchItem, empty constructor,
                 addSearchItem (requires SearchDimension and SearchConstraint, or just a SearchItem),
                 setComparisonOperator
    SearchParameter: implements SearchItem, constructor requires SearchDimension and SearchConstraint objects
    Search: extends SearchGroup, constructor requires TableId object
    RetrieveLimitedRecordsCommand: setSearch method requires Search object
    FieldDimension: constructor requires FieldId object or FieldIds[] fieldPath
    TextSearchConstraint: constructor requires string value and int comparisonOperator(enum)
    BooleanSearchConstraint: constructor requires boolean value
    Scenario:
    Okay, so say we have a main table, Products.  We want to search the table for the following:
    field IsActive = true
    field ProductColor = red or blue or green
    So the question is how to build this search with the above classes?  Everything I've tried so far results in the following error:
    Exception in thread "main" java.lang.UnsupportedOperationException: Search group nesting is currently not supported.
         at com.sap.mdm.search.SearchGroup.addSearchItem(Unknown Source)
    I can do just the ProductColor search like this:
    Search mySearch = new Search(<Products TableId>);
    mySearch.setComparisonOperator(Search.OR_OPERATOR);
    FieldDimension myColorFieldDim = new FieldDimension(<ProductColor FieldId>);
    TextSearchConstraint myTextConRed = new TextSearchConstraint("red",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConBlue = new TextSearchConstraint("blue",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConGreen = new TextSearchConstraint("green",TextSearchConstraint.EQUALS);
    mySearch.addSearchItem(myColorFieldDim,myTextConRed);
    mySearch.addSearchItem(myColorFieldDim,myTextConBlue);
    mySearch.addSearchItem(myColorFieldDim,myTextConGreen);
    the question is how do I add the AND of the BooleanSearchConstraint?
    FieldDimension myActiveFieldDim = new FieldDimension(<IsActive FieldId>);
    BooleanSearchConstraint myBoolCon = new BooleanSearchConstraint(true);
    I can't just add it to mySearch because mySearch is using OR operator, so it would return ALL of the Products records that match IsActive = true.  I tried creating a higher level Search object like this:
    Search topSearch = new Search(<Products TableId>);
    topSearch.setComparisonOperator(Search.AND_OPERATOR);
    topSearch.addSearchItem(mySearch);
    topSearch.addSearchItem(myActiveFieldDim,myBoolCon);
    But when I do this I get the above "Search group nesting is currently not supported" error.  Does that mean this kind of search cannot be done with the new MDM API?

    I'm actually testing a pre-release of SP05 right now, and it still is not functional.  The best that can be done is to use a PickListSearchConstraint to act as an OR within a field.  But PickList is limited to lookup Id values, text attribute values, numeric attribute values and coupled attribute values.  It works for me in some cases where I have lookup Id values, but not in other cases where the users want to search on multiple text values within a single field.

  • We have multiple users, each with multiple devices, on 1 apple id - as we want to share music and ibooks etc.  We want the children to have access to the store, but with a financial limit. How do we do this?

    We have multiple users, each with multiple devices, on 1 apple id - as we want to share music and ibooks etc.  We want the children to have access to the store, but with a financial limit. How do we do this?

    Welcome to the Apple Community.
    That's simply not possible I'm afraid. You'd need to give them their own account and allowance or make it so you are required to be there to input the password when they wish to make a purchase.

  • Hybrid Search with Office 365 from On Prem Search

    I have followed this post on Setting up Hybrid search of Office 365 from Sharepoint On premise:
    http://blogs.technet.com/b/wbaer/archive/2014/03/24/one-way-outbound-hybrid-search-step-by-step-and-onedrive-for-business.aspx#comments
    As well as tested all of the validation steps in the following Technet Article on setting up Identity Management.
    http://technet.microsoft.com/en-us/library/dn197169(v=office.15).aspx
    However the last validation step in each is to test the Result Source and I get the following error:
    Web error: System.Net.WebException: The request was aborted: The request was canceled. ---&gt; Microsoft.SharePoint.IdentityModel.OAuth2.SPOAuth2ErrorResponseException: [invalid_client] ACS50027: JWT token is invalid.
    Trace ID: 375a7faa-be03-441e-be21-5b29
    I am really scratching my head here and My Google Foo is coming up empty on any variation of that error.

    Hi,
    According to your post, my understanding is that you wanted to configure Hybrid Search with Office 365 from On Prem Search.
    Please make sure you configure Hybrid Search correctly.
    For more information, you can refer to:
    Hybrid for SharePoint Server 2013
    Configure hybrid Search for SharePoint Server 2013
    The JWT token invalid error was due to an invalid date format for the STS certificate.
    I recommend to created search service application using Wizzard , then move the search roles across multiple boxes using the steps mentioned
    http://technet.microsoft.com/en-us/library/jj729803.aspx
    You can also rename the search databases.
    Renaming SharePoint 2013 Search databases
    Troubleshooting hybrid environments
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Is it possible to create a form with multiple form fields on a single line?

    Is it possible to create a form with multiple form fields on a single line?  I can't find anything in the documentation or a template that does this.
    I am trying to create a "documents received" checklist with a check box on the left margin, a date-received field to the right of the check box and and a description of the document (Formatted Text) on the far right.
    In the past I have entered the Fixed Text with a word processor, published it to a PDF file, then added the check box and date fields with the Acrobat Forms editor.  I would prefer to use FormsCentral if it is possible.

    We now support multiple fields on one line. This post provides a brief overview.
    Give it a try and send us your feedback.
    Sorry it took so long.
    Randy

  • Best Solution for Creating an Onlne Purchase order form with multiple calculation fields

    I am a bit confused.  Our school has a Forms Central account which works great for our registration forms but I need to find a solution for creating an online purchase form with multiple calculation fields - I know that forms central does not support calculation fields (too bad) but I know that Acrobat Pro does... soooo...
    Can you create the forms in Acrobat and then somehow integrate the advanced features into forms central?  Do they talk to each other?  Is this easy to do? .... I guess another way to putting it is can you create the forms in Acrobat including all of the advanced features for payment calculation and then host it online using Forms Central to manage and collect the data? (I guess that really is my question)
    Thanks (how does this compare to a solution like Formstack?)

    Hi, thanks.
    The naming convention was the consistant up until a point when I read that you need a '.' syntax (?!) - does anyone know if this is true?
    Attached is a version with Bernd Alheit's suggestion and with all the naming of the fields being consistant. It's still not working for me though after doing this and I'm stuck as to why, because I think it should work. I've also tried writing the calcualting line of code in the same manner that Bernd Alheit suggests before I came on here, and it wouldn't work then.
    As with any coding, it must be something to which I have done, but I can't see it anywhere
    Any ideas? Thanks for helping me
    Cheers

  • Can't find instructions for setting a PDF form to allow users to type in the fields and save the form.  Thanks

    Can't find instructions for setting a PDF form to allow users to type in the fields and save the form.  Thanks

    Hi,
    Have a look at this page Acrobat refers to them as "Reader Extended PDF", Adobe Acrobat X Pro * Enable Reader users to save form data
    Regards
    Bruce

  • Search help with multiple key fields

    Hi,
    I want to dispaly search help on a field from a internal table have multiple key fields i.e combination of fld1 + fld2 +fld3 makes one single row. Therfore can any one tell me how to return that single row , because if I am using function F4IF_INT_TABLE_VALUE_REQUEST I get only one return field that I select by which I can't get the actual line that I have selected as there may be more that one line for that field.
    please suggest any way through programming not by creating any search help through se11.
    thanks

    Hi,
    Use select query to select the fields & display them.
    In the following code i've selected only a single field in select query but u can do it for more than 1 & proceed similarly.i've tried it before using this code.
    SELECT WERKS
             NAME1
             FROM T001W
             INTO TABLE ITEMP
             WHERE IWERK = 'M011'.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                  DDIC_STRUCTURE   = ' '
                RETFIELD         = 'WERKS'
                  PVALKEY          = ' '
                  DYNPPROG         = ' '
                  DYNPNR           = ' '
                  DYNPROFIELD      = ' '
                  STEPL            = 0
                  WINDOW_TITLE     =
                  VALUE            = ' '
               VALUE_ORG        = 'S'
                  MULTIPLE_CHOICE  = ' '
                  DISPLAY          = ' '
                  CALLBACK_PROGRAM = ' '
                  CALLBACK_FORM    = ' '
           TABLES
                VALUE_TAB        = ITEMP
                  FIELD_TAB        =
               RETURN_TAB       = T_RETURN
                  DYNPFLD_MAPPING  =
             EXCEPTIONS
                  PARAMETER_ERROR  = 1
                  NO_VALUES_FOUND  = 2
                  OTHERS           = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      S_WERK-LOW = T_RETURN-FIELDVAL.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • Search with multiple criteria

    I have searched high and low on the internet o find a way to
    do a search through multple fields but the more I lookthe more i
    get confused. here is the problem. i want to do a search where the
    user can input a data element and select the matching type and
    display he results.below is the code that i have for my search
    page, but I am confused about the more important parts of the fom -
    the actual search variables.
    If you look t the code below you see that I have a test field
    named "recordID" and a drop down list named "select".
    I want to dispay the results in which 'recordID' looks in
    table thatis equal to 'select'.
    an example of what I want is at the following link.
    http://www.phpscriptsearch.com/

    DizzDizzy wrote:
    > I went to
    http://www.webassist.com/professional/products/productdetails=
    =2Easp?PID=3D117&CouponID=3Dss2008&RID=3D590&WAAID=3D92
    > but i could not find the solution there
    Hi Dizz:
    Under the banner you'll find links for Overview, Features,
    System=20
    Requirements, Support. When you click on the Features link,
    the MooFX=20
    Accordian javascript class runs to update the content on the
    page. The=20
    bullet points are clickable to similarly update the content
    on the page. =
    Click on the bullet point "Pro search and sort enhancements"
    and read=20
    the paragraph at the bottom under the screen shots:
    Sophisticated search capabilities
    DataAssist integrates the advanced search functionality
    previously=20
    available in Database Search. Now you can combine advanced
    Google-style=20
    keyword searches (across multiple database columns) with
    price, date or=20
    number ranges =96 all without coding.
    Please take a look at the feature tour:
    http://www.webassist.com/professional/products/featuretour/media_117.asp
    As for the Prof's requirements, the form submits two values,
    a recordID=20
    and a selection to either search by company or by store
    number.
    If Prof has a table named company and another named store
    number, the=20
    way you'd search these tables would be to have another table
    that=20
    contains the selectcategories with a column containing the
    values=20
    "company" and "storeNumber" along with ID columns that relate
    to a=20
    categoryID column in the companies table and the storeNumber
    column in=20
    the Stores table. Using this relationship Prof can create a
    reccordset=20
    on his results page that returns the values using an INNER
    JOIN to=20
    combine the tables in the recordset. Similarly by
    constructing the=20
    relationships properly as to his records (let's say he's
    searching 45RPM =
    singles - anybody remember those thingies?) His company table
    can have=20
    an ID column that references his product table where a
    companyID is=20
    stored. Again, a JOIN statement is used to include the
    product=20
    information, including the ProductID in the Recordset.
    Similarly for the =
    Stores table, again, the Products table has a column that
    identifies the =
    store that carries that productID. If more than one store
    carries the=20
    product, the column should be a storesID column that
    references a=20
    ProductStores table which references the stores that carry
    the product=20
    by a common ID. Again, using the JOIN (this recordset query
    would get=20
    complex) the necessary data can be returned.
    The DataAssist Search Server Behavior applies a sophisticated
    WHERE=20
    clause to the recordset. so that the requested records can be
    returned=20
    to the page. Prof is not needing a tool to build database
    management, so =
    I can see his point... but if this is something you do
    regularly,=20
    DataAssist will pay for itself over and over in time saved.
    And WebAssist is conducting a 50% off sale through next
    Friday, so it's=20
    a good time to get on board. Here's a link to the discount
    page for all=20
    the products:
    http://www.webassist.com/professional/products/productresults.asp?CouponI=
    D=3Dss2008&RID=3D590&WAAID=3D92=20
    enthusiastically,
    mark haynes.

  • Sharepoint search with multiple managed metadata terms

    How do we search multiple managed metadata terms programmatically? I tried the following but did not get any results. The below url does not yield any results.
    http://app-0efff1c35fb5bc.xxxxxxx.com/sites/test/webpart/_api/search/query?querytext=%27owstaxIdDocumentx0020Type:Checklist;Intel%27&selectproperties=%27Path,Title,Author,LastModifiedTime&rowlimit=500&trimduplicates=false&enablequeryrules=false
    owstaxIdDocumentx0020Type:Checklist;Intel
    The results exist when the querytext is changed to owstaxIdDocumentx0020Type:Checklist. How do we perform an "AND" operation with multiple terms?
    V

    Have you tried:
    owstaxIdDocumentx0020Type:Checklist AND owstaxIdDocumentx0020Type:Intel
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Attaching search help to SCREEN FIELDS AND TABLE FIELDS

    Hello experts,
    Himanshu here.
    Could you please explain how we can assign search Help to a screen field AND TABLE FIELDS in ABAP?
    Please reply at the earliest,as we have some deliverables to be met
    Thanks

    Hi,
    In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.
    A dialog box appears in which you must select the type of search help.
    Select Collective search help and choose .
    The maintenance screen for collective search helps is displayed.
    Enter an explanatory text in the field Short text.
    You can for example find the search help at a later time using this short text.
    In the Definition tab page enter the parameters of the collective search help.
    Select the Imp flag if it is an import parameter. Select the Exp flag if it is an export parameter.
    Define the types for the parameters of a collective search help by assigning a data element. Enter the name of the data element that describes the contents of the search help parameter in the Data element field.
    You can assign the parameter a default value in the Default value field.
    In exceptions it could be necessary to change the standard process defined by the search help. You can implement the deviation from the standard using a search help exit.
    In this case enter the name of the search help exit in the corresponding field.
    On the Included search helps tab page, define the search helps that you want to include in the collective search help.
    You can include elementary search helps and collective search helps.
    Use the Hide flag to control whether an included search help should appear in the dialog box for selecting the elementary search help. If the flag is set, the search help is not offered.
    It makes sense to hide search help inclusions if one or more search paths in the standard system should not be used in a concrete R/3 System. Similarly, search help inclusions can also be already hidden in the standard system because they only can be used meaningfully in a few R/3 Systems. You have to cancel the flag in this case.
    Position the cursor one after the other on each allocated search help and choose Parameter assignment.
    In the next screen, enter the parameter names of the elementary search helps to which the corresponding parameters of the collective search help should be assigned in the field Reference parameter.
    You can select the parameters contained in the included search help using the input help. Create a proposal for the assignment with Proposal.
    Save your entries.
    A dialog box appears in which you have to assign a development class to the search help.
    Choose .
    Result
    The collective search help is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred when the collective search help was activated, the activation log is automatically displayed.
    Do not forget to link the search help to a screen field. The search help attachment is not part of the search help definition; it is part of the object definition to which the search help is attached.
    regards,
    veeresh.

  • How to add search help in Ztable fields and how to make filelad as check bo

    Hello Friends,
    I have one table named ZAUDIT with 5 fields.
    1 . I want to put search help for each field but it shows tht Inactive message.
    Sujjest me steps to create search help.
    2.. In my table I want to display content as check boxes in my last field.
    How to make it?
    Points awarded soon.
    Regards,
    NVM

    Hi,
    steps to create search help:
    Step1 : Go to Se11 and Select Search Help and Enter One Name and Click Create
    Step2 : Enter your Table name in 'Selection Method' Field.
    Step3 : Enter the field Name and tick the Flags Imp and Exp and Type 1 and 2 in Lpos,
    Spos fields.
    Step4 : Save and activate it.
    Goto the table, select the field which u want search help and press button search help, give the search help name which u created.
    To add check box for particular field,
    make use of data element <b>check_box</b>

  • SP2013: Scaling search with multiple app server

    Hi Team,
    I am scaling a new SP environment with multiple App Server.
    I have used AutoSPINstaller to install SP2013 and Search. My search components are spread across all servers. All Search components on all servers and I have a blank publishing site as part of my content source.
    My issue is when i start full/Incremental crawl. It keeps on crawling for the whole day and do not produce any crawl error neither it stops. We waited for even 2 das but the crawl kept on going on.
    Any help will be really appreciated.
    Thanks Ba$va

    Hi Basva ,
    Follow these steps (one at the time) to reset the Content Source crawl:
    Start -> Run -> Services.msc -> Restart the “SharePoint Server Search 15”.
    Make sure  the Application Server Administration Service Timer Job working .
    Navigate to Central Administration-> Manage service application->
    Search Service Application,
    Reset Index and see if that fixes the problems.
    Go into the Services.msc  on each server and change the "RECOVERY" method of the “SharePoint Server Search 15” from "FIRST FAILURE"  to "TAKE NO ACTION" so that the service did not restart before
    all the servers had their "SharePoint Server Search 14" stopped.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

Maybe you are looking for