Query of Search Results

I need some best practices advice.  I'm not sure if there is a better way to do what I'm trying to accomplish.  The execution time is very high which is why I'm looking for alternatives.  I welcome any tips to help reduce this execution time.  Hopefully, I can explain this clearly because I'm not seeing it clearly.  I'm going to just use one form field for this example, however, there are about 10 search field options.
Multiple items (checkboxes) can be selected for one field.  I am going to use CODES for my example.
The cfquery on the results page uses a view that has been created in the database.  This view joins a primary table (company) to several other tables (i.e., codes) that possibly have many records for that one company.  Within the cfquery, I use IN for the joined tables just to see if that company has any of those records.  It appears to be working and not taking too long.  In order to output the results, a  distinct company is being used because multiple rows could be returned for one company, and I only want to output each company one time. 
Then, I want to output the company information.  I also want to output the multiple codes for returned for each company.  So, I have to do a little query within the main query output to get those records.  Because there are so many search field options, this is where I believe the execution time is slowing down because is has to loop very every company returned (800+) and multiple search fields means different queries.  Below is a sample piece of the code.
I am thankful and open to any ideas.  Sincerely.
<cfquery datasource="xxx" name="Company">
Select distinct company
from vwCompany
where active='true'
cfif isdefined("code") and code neq ''> and code IN (<cfqueryparam value="#form.code#" list="yes">)</cfif>
</cfquery> 
<cfoutput query="company">
<CFQUERY DATASOURCE="xxx" NAME="getCodes">
    SELECT     *
    FROM     tblCodes
    WHERE code IN (<cfqueryparam value="#form.code#">)
</CFQUERY>
#company#
codes: #valuelist(getcodes.code)#
</cfquery>

Thank you all for your input.  As a follow-up to what seems to have helped and to help others is a description below.
I was having trouble getting an accurate recordcount of companies using the primary query (search results) because it was creating rows for the joined tables with a one-to-multi relationship.  It was accurately counting all the rows (multiple codes) returned and not just the distinct field (company) that I needed.
I worked around it by using query of queries to get the accurate recordcount off of that primary query (companies used in previous example which I will rename as getcompanies since it is the same name as a table column).
<cfquery dbtype="query" name="records">
Select distinct company
from getcompanies
</cfquery>
I then output each company record and their associated codes by using another QoQ:
<cfoutput query="getcompanies">
<cfquery dbtype="query" name="getcodes">
Select codes
from getcompanies
where companyid= <cfqueryparam value="#getcompanies.companyid#" cfsqltype="cf_sql_integer">
and code is not null
</cfquery>
#company# Codes:</strong> #valuelist(getcodes.codes, ", ")#
</cfoutput>
If anyone knows of a more efficient way, I always welcome the suggestions.  It seems to have reduced the execution time from 16K ms to 6K ms, but I'm still trying to get the execution time down to under 250 ms.  There are only 800 records.

Similar Messages

  • If Condition in Keyword Query Language (SharePoint 2013 Search Results)

    Hi All,
    Can we have an "If" condition in Query text box in SharePoint 2013 Search results page. For example, i want to hide all list items whose
    status is "HideItem" from appearing in search results?
    I am trying this: {?{searchTerms} (contentclass:STS_ListItem -ListItemStatus:"HideItem")}
    But, this hides all items like aspx pages, pdf's, docs and displays only list items. 
    Similarly, hide pages of some name like: AllItems.aspx, ViewDetails.aspx, AllAssets.aspx 
    {?{searchTerms} (contentclass:STS_ListItem_850 -filename:"AllItems.aspx")} 
    Any help would be great. Thanks in advance.

    Thanks Steve. I found this solution after a bit of struggle :).
    Also, date comparision is not working as expected. 
    {?{searchTerms} NOT(contentclass:STS_ListItem AND ListItemStatus:"HideItem" AND
    PublishDate<{Today})} is not working and throwing syntax error.
    I don't see any solid reference to KQL syntax except this msdn link.
    Can you please suggest any good material on KQL syntax ?
    Thank you once again.

  • How to configure search results web part to display results only after a query is generated from user?

    Hi All,
    I am crawling documents from a file server. I created a new content source and crawled the documents. All documents are crawled successfully.
    Then I went to my enterprise search center site collection and created a new result source. I have added the query to use above content source.
    After that, on a page I am trying to configure the search results web part to display documents using this result source. Now the problem is:
    It displays all the documents that are crawled without searching for anything. I mean first it should not display any results. If a user searches for something , then according to that search it should display results.
    Any idea how to do this in the web part? I am using SharePoint 2013 on premise enterprise edition. No code. Totally OOTB.

    Hi Mohan,
    What did you use for the Query text in the result source?
    I could reproduce this issue when I used Query text like: {searchTerms} Path:”http://sps2k13sp/sites/First/Shared%20Documents”
    Then I changed the Query to
    {?{searchTerms}
    Path:"http://sps2k13sp/sites/First/Shared%20Documents"}
    , then Search result web part didn’t return results without searching.
    So , check your result source, and use the Query like the above(adding "{?...}").
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • ADF Query not showing correct search results.

    Hi,
    I am using normal ADF af:query to search data using a VO Criteria.
    We have modified the getter of searched column in VORowImpl java class to return values based on NLSID search from cache.
    Logic in getter:
    If for a column_name nlsid is present then show data as the value of nlsid.
    Suppose Initially:
    column_name = "Column1"
    column_name_nlsid="Column1_nlsid"
    column_name_nlsid_value="Column1_nlsid_value"
    The table will show:
    column_name: "Column1_nlsid_value"
    if we search "Column1" as column_name, The Search will also show:
    column_name: "Column1_nlsid_value"
    in results
    But,
    If we modify the nlsid value as:
    column_name_nlsid_value="Column1_nlsid_value_MODIFIED"
    Then
    The table will show:
    column_name: "Column1_nlsid_value_MODIFIED"
    if we search "MODIFIED" in column_name, The Search will NOT show any results
    So, it seems to me that the af:query search always searches upon the values derived from InternalAttribute values.
    What can i do to over-ride such behaviour , so that the search also takes the data from modified getters.

    Try posting in Jdeveloper Forum JDeveloper and ADF which has more audience

  • Access query strings in a search results page with custom display template

    am trying to create a  custom display template in my search results page , so i went to download the itemdefault html file and renamed it and  saved as  different file.and  am started to updating.
    the issue i am facing here is : in my  search results page there are 2 query strings, which are passed by anotehr .net appln[ another asp.net appln will be sending the query string to my sp 2013 search results page]
    but, how can i  read these 2  query strings using jslink and  new token _#- ? 
             <!--#_
               var QStringResults= null;
    ctx.OnPostRender = [];
    ctx.OnPostRender.push(function(){ 
    QStringResults= getQuString(); //here am unable to read the QStringResults value 
     _#-->  
    the below is my cstomhtml file
    am unable to  get the values :
                   <a href="http://srvrname:2013/sites/CMP/_layouts/15/BIFAddInputRef/bifpage1.aspx?bif1=_#= $htmlEncode(QStringResults) =#_"> Add Input Reference </a>
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> 
    <head>
    <title>Item BIF</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:MasterPageDescription msdt:dt="string">Displays the default result item template.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#SearchResults;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title','Path':'Path','Description':'Description','EditorOWSUSER':'EditorOWSUSER','LastModifiedTime':'LastModifiedTime','CollapsingStatus':'CollapsingStatus','DocId':'DocId','HitHighlightedSummary':'HitHighlightedSummary','HitHighlightedProperties':'HitHighlightedProperties','FileExtension':'FileExtension','ViewsLifeTime':'ViewsLifeTime','ParentLink':'ParentLink','FileType':'FileType','IsContainer':'IsContainer','SecondaryFileExtension':'SecondaryFileExtension','DisplayAuthor':'DisplayAuthor','CMPBIFURL2':'CMPBIFURL2'</mso:ManagedPropertyMapping>
    <mso:_dlc_DocId msdt:dt="string">X3CVW7PXYF6P-3-222</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">3ed12157-ea19-4591-b9cd-7a826aef35dc</mso:_dlc_DocIdItemGuid>
    <mso:_dlc_DocIdUrl msdt:dt="string">http://srvrname:2013/sites/CMP/_layouts/15/DocIdRedir.aspx?ID=X3CVW7PXYF6P-3-222, X3CVW7PXYF6P-3-222</mso:_dlc_DocIdUrl>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
        <script>
            $includeLanguageScript(this.url,"~sitecollection/_catalogs/masterpage/Display Templates/Search/BIFJScript.js");
        </script>
        <div id="Item_BIF2">
    <!--#_ 
            if(!$isNull(ctx.CurrentItem) && !$isNull(ctx.ClientControl)){
                var id = ctx.ClientControl.get_nextUniqueId();
                var itemId = id + Srch.U.Ids.item;
    var hoverId = id + Srch.U.Ids.hover;
    var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Default_HoverPanel.js";
                $setResultItem(itemId, ctx.CurrentItem);
    if(ctx.CurrentItem.IsContainer){
    ctx.CurrentItem.csr_Icon = Srch.U.getFolderIconUrl();
    ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, hoverUrl);
                ctx.currentItem_HideHoverPanelCallback = Srch.U.getHideHoverPanelCallback();
    _#-->
             <!--#_
               var QStringResults= null;
    ctx.OnPostRender = [];
    ctx.OnPostRender.push(function(){ 
    QStringResults= getQuString();
     _#-->  
            <div id="_#= $htmlEncode(QStringResults) =#_" name="bifItemqstring" 
                    data-displaytemplate="DefaultItem" class="ms-srch-item" 
                    >
                    <h5 style="color:ghostwhite;background-color:black">
                        <a href="_#= ctx.CurrentItem.Path =#_"> _#= ctx.CurrentItem.Path =#_</a>
                    </h5>
                </div>
                <div id="_#= $htmlEncode(itemId) =#_" name="bifItem" 
                    data-displaytemplate="DefaultItem" class="ms-srch-item" 
                    onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" 
                    onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_">
                    <h1 style="color:ghostwhite;background-color:black">
                        <a href="_#= ctx.CurrentItem.Path =#_"> _#= ctx.CurrentItem.Path =#_</a>
                    </h1>
                    <h4 style="color:ghostwhite;background-color:black">
                        <a href="_#= ctx.CurrentItem.Description =#_"> _#= ctx.CurrentItem.Description =#_</a>
                    </h4>
                    <h4 style="color:ghostwhite;background-color:black">
                        <a href="_#= ctx.CurrentItem.LastModifiedTime =#_"> _#= ctx.CurrentItem.LastModifiedTime =#_</a>
                    </h4>
                    <h3 style="color:floralwhite;background-color:green">
                        var mybifurl1= document.getElementById($htmlEncode(QStringResults));
                    <a href="http://srvrname:2013/sites/CMP/_layouts/15/BIFAddInputRef/bifpage1.aspx?bif1=_#= $htmlEncode(QStringResults) =#_"> Add Input Reference </a>
                    </h3>
                  </div>
            <div>
            </div>
                    <div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"></div>
    <!--#_ 
    _#-->
        </div>
    </body>
    </html>
    when i run the page , i a getting the query string value as   undefined! though the custom javascript is getting called.

    i am able to get the  results  by implementing the below:
    <h4 style="background-color:black">
                        <a onclick="javascript:mycalltojs(_#=
    ctx.CurrentItem.Path=#_) > click here </a>
                    </h4>
    hope this helps  anyone

  • Search Results Query Text - Get all data, Exclude all list data except one

    Hi Experts,
    I have a situation wherein in the global search of our internal site, we have to display all results & restrict any list item except one list. Earlier we had restricted /Lists/ & People to be displayed in the results.
    But in the new search results I have to display results from only one list along with other results (documents, sites, pages etc).
    Below is the original query text entered in the Search Results Query Text editor
    {searchboxquery} -contentclass:STS_List_Links  
    -filename:allitems.aspx  -Path:/articles/Pages/default.aspx
    -filename:DispForm.aspx  -Path:/Lists/ -Path:person.aspx
    I have tried various different queries with AND, OR operator. I have researched other blogs, sites over google. But unsuccessful. I am sure this is not a rare requirement. Need your expert help.
    I have tried this query also...
    {searchboxquery} (-filename:allitems.aspx -Path:/articles/Pages/ -Path:/Lists/ -Path:/PublishingImages/) OR
    (+(+Path: /Lists/ArticleContent/ AND +filename:*.aspx) AND
    -(-Path: */Lists/* OR -filename:*.aspx))
    Vighnesh Bendre
    MCTS
    http://markviky.blogspot.com

    Vighnesh,
    You should have success using the following:
    {searchboxquery} -contentclass:STS_List_Links -filename:allitems.aspx  -Path:/articles/Pages/default.aspx -Path:person.aspx ((-filename:DispForm.aspx  -Path:/Lists/) OR Path:/Lists/ArticleContent/)
    Two things from your original query were excluding list items from your results, your exclusion of file
    DispForm.aspx and path Lists.  By using "OR" in the above query, we're creating an exception to also allow items under
    Lists/ArticleContent to be included in the results.

  • Using "Restrict by app" in change query causes issues with Search Results

    Hello!
    I am hoping some experienced SP admin can help me out. I am having issues with the relevance ranking for my search results web part.
    I created a Wiki (OOTB) within a site collection and on the home page of the Wiki I was looking to apply a Search Box and Search Results web part for easy searching. I wanted to ensure the search results were restricted to the scope of the pages within the
    wiki. I did the following after adding the 2 web parts:
    Entered edit mode for the page
    Started to edit the Search Results web part
    Under Properties for Search Results clicked on "Change Query"
    Navigated to BASICS and clicked "Switch to Quick Mode"
    For Select Query, picked "Wiki (System)" option
    For Restrict by app, picked "Specify a URL" and input the wiki URL "http://webapp.com/sites/sitecollection/wiki"
    Click OK
    The web part has 6 automatic results when I hit the page. These are the only 6 pages in my wiki. When I search a word or title of a page, they are not ranked in order or relevance. The ordering is static to what was being shown before the search, but the
    keywords I'm searching are bold. With out the taking the steps above, I can easily search these pages and have them ranked appropriately so I'm not too sure what I'm doing wrong. 
    Other Details
    The pages have been crawled and can be searched from anywhere else in SP.
    I am only a site collection admin for this specific site collection.
    I other than the steps above, I have not made any changes or customization to the search web parts; they are both out of the box SP.
    The SP Farm admin we unable to pin point what the root cause is either.

    Hi Mikael,
    Sorry for the wait, I was unable to post pictures, which i felt would better describe my issue.
    Could you output the query template you are ending up with?
    If you can tell me how to accomplish this, then I can provide it. Please keep in mind that I am only a site collection admin.
    Also, is the ranking/sorting for your webpart set to ranking?
    When looking at the web part settings, I didn't see an option to modify the ranking. Unfortunately, some sites in my intranet are down now so I can't even double check. Once it's back up, I will verify this as well.
    And how do you know they are ranked incorrectly?
    I wanted to display an image showing what I meant by this. As the wiki is down, I'll do my best with words. When I visit the wiki home page, I already have the search and search results web parts there. Without searching anything, the search results
    web part displays 6 pages that are available in the wiki. When I search, I expect to see the most relevant result at the top. similar to the following: 
    *Search result from another section of the intranet site.*
    What I receive instead is the same list of wiki pages, in the same order. The most relevant result
    is not moved to the top like in the image above, but I can see that the word "rush" is highlighted in bold. I hope this helps.
    If you need more of a description, please let me know.
    Thank you

  • Search Results web part - Custom Query using "Value with a parameter from URL" inconsistent

    I have encountered what I think may be a bug, but I am hoping that there is something that I am missing.
    Within my search site, I have created a new search results page where I want to customize the "Search Results" web part query.  I can add in any number of property and keyword filters (using the "Build Your Query" dialog) without
    issue... until I add a filter that uses the QueryString property (the builder dialog calls this "Value with a parameter from URL").
    If I use {QueryString.MyParameterX} for filtering, it works beautifully in the query builder dialog.  I see the expected results in the search results preview pane, but as soon as I apply the changes things become inconsistent. 
    If I close/reopen my browser and navigate to my page at http://myaddress/search/Pages/testresults.aspx?MyParameterX=test I see results.  If I then refresh the page, I get a "Nothing here matches your search" message.  I can then go to
    the same address but change one character to an uppercase character and get results.  Refreshing that same page again returns "Nothing here matches your search".  I can only get search results one time per uniquely cased URL without having
    to close/reopen my browser.  This behavior was seen on both Firefox and IE.
    Finally, I found that if I instead navigate to http://myaddress/search/testresults?MyParameterX=test, it always returns results.  This, unfortunately isn't the best solution for me... but it is a solution.
    Any insight that anyone can provide is greatly appreciated!  I would really like to be able to depend on this working in all logical cases (especially since the search center of other sites is set using the path all the way down to /Pages).
    Thanks!

    Hi, have you been able to solve this issue? I'm getting the same issue and I cant solve it (required CU is installed).
    Fabio

  • Converting an Ultra Search result to a ColdFusion query

    Hello,
    I'm trying to convert an Ultra Search result into a ColdFusion query.
    There's a java class for CF which turns a java result into a CF query, coldfusion.sql.QueryTable(java.sql.ResultSet), but is there anything which will convert an Ultra Search result to a java result or a CF query?
    Thanks.

    HOMEWORK ALERT HOMEWORK ALERT
    You can't cast from a character to a String. That doesn't work.
    However, in a fit of being helpful.
    Look at the constructors for the String object in the API
    Link ===> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#String(char[])
    char[] charA = {'H', 'E', 'L', 'L', 'O', ' ', 'W', 'O', 'R', 'L', 'D' } ;
    String a = new String(charA) ;
    System.out.println(a) ;There's a price for my help, and it's this. Now that you understand what you can do, is it a good idea or a bad idea and why ???
    Explain.

  • How To Make Search Query Showing the Result As List of Buttons.

    Can some one give me an idea how to start to make a Search Query showing the results as list of buttons.. i have already have my buttons with names. i just dont know how to make a search query.
    this is my on screen keyboard i made..
    im making a system that the result were a list of buttons.. showing like this
    This was supposed to be the output of the query that i need to do..
    Please help me.. i just need a idea or tips how to make this one.

    Here is code I posted recently for another question
    Public Class Form1
    Const BUTTON_SIZE As Integer = 20
    Const SPACE As Integer = 5
    Sub New()
    ' This call is required by the Windows Form Designer.
    InitializeComponent()
    ' Add any initialization after the InitializeComponent() call.
    Dim buttons As New List(Of List(Of MyRadioButton))
    For row = 1 To 6
    Dim newRow As New List(Of MyRadioButton)
    buttons.Add(newRow)
    For col = 1 To 6
    Dim button As New MyRadioButton()
    button.row = row
    button.col = col
    button.Height = BUTTON_SIZE
    button.Width = BUTTON_SIZE
    button.Left = col * (BUTTON_SIZE + SPACE)
    button.Top = row * (BUTTON_SIZE + SPACE)
    button.Name = String.Format("radGr1{0}_{1}", row.ToString(), col.ToString())
    Me.Controls.Add(button)
    newRow.Add(button)
    AddHandler button.CheckedChanged, AddressOf Radio_Change
    Next col
    Next row
    End Sub
    Private Sub Radio_Change(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim button As MyRadioButton = CType(sender, MyRadioButton)
    Dim row As Integer = button.row
    Dim col As Integer = button.col
    End Sub
    End Class
    Public Class MyRadioButton
    Inherits RadioButton
    Public row As Integer
    Public col As Integer
    End Class
    jdweng

  • OA Query Region shows previous search results when moving between pages

    Hello All,
    I have a custom OA Page which has a query region based on a LOV for searching device names. The problem I am facing is once device name is searched and I go to another page through the quick links and come back to same Search Device page, it shows the previous searched results. I am not retaining AM for any page navigation.
    Things I have already tried :
    1 . I have tried refreshing VO by using clearcache and reset methods on VO.
    2. Get the Go button from the query region in ProcessFormRequest and on Go button click I use forwardImmediatelyToCurrentPage. And in Process Request method I am querying the results manually when Go button is clicked. Otherwise I am manually making the where clause condition 1=2 and ensuring that the VO does not return any rows.
    But still I am not able to get rid of the issue.
    The code used is pasted below for your reference. It is urgent. Can you please provide any pointers.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    try
    VpaAdminAMImpl am = (VpaAdminAMImpl)pageContext.getApplicationModule(webBean);
    TkvpaDeviceSearchVOImpl deviceAll = am.getTkvpaDeviceSearchVO1();
    deviceAll.clearCache();
    deviceAll.reset();
    deviceAll.setWhereClause("1=2");
    deviceAll.setWhereClauseParams(null);
    String query = deviceAll.getQuery();
    System.out.println("getSearchResult query :="+query);
    deviceAll.executeQuery();
    OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("region1");
    String goAction = queryBean.getGoButtonName();
    if(pageContext.getParameter(goAction) != null)
    getSearchResult(am, pageContext, webBean);
    catch(Exception ex)
    throwException("SearchDeviceCO.processRequest",ex);
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    String action = pageContext.getParameter(EVENT_PARAM);
    OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("region1");
    String Go = queryBean.getGoButtonName();
    System.out.println(pageContext.getParameter(Go));
    if(pageContext.getParameter(Go) != null)
    pageContext.forwardImmediatelyToCurrentPage(null,false,"N");
    public void getSearchResult(VpaAdminAMImpl am, OAPageContext pageContext, OAWebBean webBean)
    try
    String device = pageContext.getParameter("deviceSearch");
    StringBuffer sb = new StringBuffer();
    if(device != null && device != "")
    sb.append(" DEVICE_NAME = '");
    sb.append(device);
    sb.append("'");
    String sql = sb.toString();
    TkvpaDeviceSearchVOImpl deviceAll = am.getTkvpaDeviceSearchVO1();
    deviceAll.setWhereClause(sql);
    deviceAll.setWhereClauseParams(null);
    String query = deviceAll.getQuery();
    System.out.println("getSearchResult query :="+query);
    deviceAll.executeQuery();
    }catch(Exception e)
    e.printStackTrace();
    Thanks in Advance,
    Abhishek Mishra

    Hi Anand,
    The getSearchResult method also does the same thing. I have also tried to remove the dependency on getSearchResult and wrote the same code in ProcessRequest() but still it does not solve the problem.
    In fact, I have ensured that the VO does not contain any records and have checked these by using SOPs and debug in JDEV. The interesting point is the VO does not have any records but still the previous search data and search criteria is shown when we navigate to the page. Printed the query just before performing execute query and that query does not return any records. Also tried printing something if there are any records in the VO by using vo.hasNext().
    Data gets stored somewhere and it is shown when the page is navigated from other page. FYI, this page is accessed from quick links and there are other pages also in the quick links and when we navigate between these pages we get to see the previous search results. Tried methods clearCache(), reset() on VOs but still unsuccessful.
    Not even that I thought that the VO may be corrupted in some sense so I created a new VO instance in the AM and then used newly created VO instance in the query region. But still no luck.
    Any pointers will be appreciated.
    Thanks in Advance,
    Abhishek

  • Issue in disabling button and retaining search results of query bean

    Hi,
    I need help in 2 issues
    1) I have a query bean and an advanced table attached to it. I have enabled table actions and put a button inside that. The requirement is the button should be enabled only if a record is present in the advanced table. If for a search parameter, no results are displayed in the advanced table, the button should remain disabled. The moment the results are populated in advanced table the button should be enabled. Please let me know how this can be achieved.
    2) In the advanced table there is a column of type Link. On clicking this link i am forwarding the control to some other OAF page AA. I am retaining AM here. From this new OAF page AA user can move to some other OAF pages B or C. All these pages have different AM. There is a link called return to original page on page AA which takes user back to the search screen. When user goes to page AA and comes back to search screen without going to page B or C the search results are displayed on the page, but when user goes from page AA to page B or C and finally returns to the search screen, the data in search results along with search criteria are lost. The search screen is completely blank.
    I need to display the search results/search criteria no matter what navigation user is doing. Is there a way i can save the search query that got executed on the click of search button. I can re-execute the query when user comes back on search screen.
    Please let me know how to achieve these 2 functionalities.
    Thanks,
    VG
    Edited by: VG on Sep 6, 2011 2:55 PM

    For (1)
    I guess you want to select single/multiple rows after the table is populated in table and perform an action using button.
    If that is the case then do not put button under table actions. Instead put it under multiselection region. Then button only gets displayed when rows are populated.
    If that is not the case then get a handle to button (use findChildRecursive, findIndexedChildRecursive may not work) and disable/enable it.
    For (2).. If you are on r12 below can be useful :- (taken from 12.1 framework guide)
    Using Search Persistence
    In the past, if a user performed a search and then drilled down to a details page, search criteria was lost when
    the user navigated back to the Search page, unless the developer retained the AM or created a custom
    implementation to persist the search criteria. As of Release 12, developers no longer need a custom
    implementation to persist search criteria, as the query region now has an automatic search persistence
    mechanism in place.
    Generally speaking, you should still retain the AM in favor of using the automatic search persistence
    mechanism for performance optimization reasons. However, if retaining the AM presents a scalability issue
    because the underlying view object (VO) had hundreds of attributes, then you should you turn off retainAM and
    allow the query region to automatically handle all the search criteria binding and use the automatic search
    persistence mechanism.
    Note: If you retain the AM state, the automatic search persistence mechanism will not be active. The search
    persistence mechanism is automatic only if the AM state is not retained.
    When a user selects the Go button to initiate a search on the query region, the OAQueryBean automatically
    caches the search criteria on the user session. After the user drills down to the detail page of the Search
    results and then returns to the Search page, the OAQueryBean restores the search criteria from the cache and
    re-executes the query using that saved critieria.
    Note: Since the query is re-executed, any sort, navigation or transient UI state of the results table will not be
    preserved. Saving the entire table state presents high overhead which is what this particular feature is trying to
    avoid.

  • Help with Search Result Query Builder (CSWP)

    Greetings,
    Is there a way to limit the number of search results returned based on each property value?  Hard to phrase my question, so I'll give my example.
    I have a Content Search Web Part that is returning results from a specific list that has a column called Category with 6 options (ex, A, B, C, D, E, F).  I want my query to return the newest 4 items by date that are tagged from each category value.
     So, latest 4 items tagged with A, latest 4 tagged with B, etc.  My CSWP would return 24 items from the query.
    Hope that makes sense.  So, is this possible through the Search query?
    Thanks!
    -B

    Hi Brian,
    Per my knowledge, it is impossible to do via Search Query in Content Search web part.
    As a workaround, you can add a Refinement Web part into the page, then click the refiner to filter each options to display the latest associated four items.
    You can do as the steps(assuming I create a list with a column called “testCategory”, like your Category column ):
    Do a full crawl for the content source.
    Create a managed property called “testCategory” to map it to the crawled property
    ows_ testCategory.
    Then do a crawl again for the content source.
    Go to a page, add a Refinement web part and a Content Search web part into the page.
    Edit the Refinement web part->Choose Refiners, add testCategory under
    Available refiners into Selected refiners.
    Remove other refiners except testCategory, click OK and OK.
    Edit the Content Search web part->Change query.
    Select a query: Local SharePoint Results, and the Query text is : Path:<the URL of the list>
    Click SORTING tab, and Sort by: LastModifiedTime(Descending), click OK.
    Under Change query, Number of items to show: 4.
    Click OK, and save the page.
    The result is like:
    After Clicking A, we can see the latest 4 items related to A:
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Send an alert with search query word if nothing return on search result??

    Hi All,
    is it possible to send an alerts to specific person, when end-users will not find any results on specific query? i know sharepoint has Search alerts, but i am looking to send an alert, if they dont find anything in search results.
    Thanks in advanced!

    Not possible out-of-the-box.
    There are search usage reports for reviewing and optimizing the results... but nothing like what you're asking for... Nor do I think such a feature would ever be added... too much potential for misuse (no results found for "JaneDoe should be fired") or overwhelming
    amounts of useless information (2000 emails indicating that "NotARealWord" returned no results).
    As a developer, it is POSSIBLE with custom development... but I'd still advise against it.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Search - Query String in the search result

    Hello,
     I have configured search in share point .
    When I search for item , I got the following url in the search result:
              /Lists/TopMenuList/DispForm.aspx?ID=31
    Now I have created a page in sharepoint called "Details.aspx"
    I need when user serach in Item , The search result display this page as the following
                /pages/Details.aspx?ID={ID}
    Thanks
    ASk

    Hi There,
    Please use the below article to change to change the default search url:
    http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/specify-search-settings-for-a-site-collection-or-a-site-HA104020835.aspx 
    Look at the 3rd step mentioned in this article under "Specify search settings for a site collection"
    Thanks,
    Gopinath Devadass - Technology Consultant (SharePoint) http://GopinathOnline.com

Maybe you are looking for

  • How to make picture on mainpage blog??

    So when i create a new entry it has the default picture that comes with the page. I then delete that picture and write my story put my picture in and even though i have put my new picture in it doesn't show up on the main page. Please check it out at

  • Error while executing JDBC receiver and sender CC

    Hi, Iam trying to RFC to JDBC scenario. when i do e2e testing iam facing error as "Configuration error: com.sap.aii.af.service.util.configuration.MandatoryParameterMissingException: Value missing for mandatory configuration attribute tableEOColumnNam

  • Scripting - Datei Platzieren ohne manuelle Bestätigung

    Wenn ich beim Scripting eine Datei mit photoshop.place() einfüge, dann muss ich immer manuell die Datei bestätigen (auf das Häckchen klicken mit der Maus, wie es beim Platzieren so ist). Kann ich dies irgendwie umgehen? Ich möchte, dass die Datei aut

  • Pr CC / Mac - Cannot open project!!!

    '08 MacPro w/ OS X 10.7.5 - Pr CC v7.0.0 (was up to date but uninstalls/reinstalls) I have been natively editing a multicam project for the last 2weeks: * 3Cams = 2 Panasonic AVCHD + 1 JVC GY-HM150U ProHD .mp4 I'm finished with the MultiCam and am no

  • Import Data into SQLite

    Having an SQLite database file, I do the equivalent of MySQL's load data local infile by doing sqlite3 myDatabase create table myTable (a, b, c); .separator ',' .import  myFile  myTableMy Java code: connection = DriverManager.getConnection(DATABASE,