Can't filter community query by custom property

I'm trying to search for a community through the objectManager based on a custom property value (part of a LoginPEI that redirects the user on login to a personalized community).  The Query() call is failing with the following exception:
    ParseQueryFilter error on clause #0
    (0x80070057) Invalid property ID specified (0xc8)
where 0xc8 is the ID of the property I'm filtering by.
The same code works correctly if I filter by PT_PROPIDS.PT_PROPID_NAME instead, making me think it's something about either that property in particular, or just filtering managed objects by extended props in general.   I've confirmed that the property has been added to the community object through the Global Object Property tool.
Code shown below (and, yes, I'm aware that the results if there are more than one matching object are undefined).  Any advice appreciated.
Thanks,
Pete
    private int lookupObjectBySingleProperty(IPTSession session, int classId, int propertyId, Object value) {
      IPTObjectManager objectManager = session.GetObjectManagers(classId);
      Object[][] filter = {
                            new Object[] { propertyId },
                            new Object[] { PT_FILTEROPS.PT_FILTEROP_EQ },
                            new Object[] { value }
      IPTQueryResult results = objectManager.Query(
        PT_PROPIDS.PT_PROPID_OBJECTID, //Property properties
        -1, // search all folders -- might want to restrict this later
        PT_PROPIDS.PT_PROPID_OBJECTID, //sort
        0, // start at first result
        -1, // return all results
        filter); // filter
      if (results.RowCount() == 0) {
        return -1;
      return results.ItemAsInt(0, PT_PROPIDS PT_PROPID_OBJECTID);

can you try filter this way:
var sURI = 'http://<host>:<port>/sap/opu/odata/sap/ZTESTODATA_SRV/';
  oModel = new sap.ui.model.odata.ODataModel(sURI, false),
  sap.ui.getCore().setModel(oModel);
  var sRead = "/pdfset(customer='" + oTF.getValue() + "')"  ;
oModel.read( sRead, null, null, true, function(oData, oResponse){
  var pdfURL = oData.url;

Similar Messages

  • How can I sort channels by a custom property?

    Hello.
    I have written a script that creates a series of formatted charts in View.  The data comes from TDMS files with several groups of channels with some custom properties assigned to the channels.  I would like to sort the channels within each group by one of these custom properties so that the curves display in the desired order.
    It appears that ChnMove and ChnRenumber can be used to reorder the channels, but how can I programatically sort the channels by a channel property?
    Thanks,
    Craig

    Hello Craig!
    Unfortunately DIAdem doesn't have a adequate command. You have to use some lines of script code. Try this bubblesort adaption:
    Option Explicit
    Call GroupChnSort(1,"name")
    Sub GroupChnSort(ByRef nGroupIndex, ByRef sgPropName)
    Dim i
    Dim j
    Dim n
    Dim anCNo()
    If GroupChnCount(nGroupIndex) > 1 Then
    ReDim anCNo( GroupChnCount(nGroupIndex)-1 )
    For i=1 To GroupChnCount(nGroupIndex)
    anCNo(i-1) = i
    Next
    For i = 0 to UBound(anCNo)
    For j = i+1 to UBound(anCNo)
    If ChnPropValGet("[" & nGroupIndex & "]/[" & anCNo(i) & "]", sgPropName) > _
    ChnPropValGet("[" & nGroupIndex & "]/[" & anCNo(j) & "]", sgPropName) Then
    n = anCNo(i)
    anCNo(i) = anCNo(j)
    anCNo(j) = n
    End If
    Next
    Next
    For i=1 To GroupChnCount(nGroupIndex)
    Call ChnMove( anCNo(i-1), nGroupIndex, i)
    Next
    End If
    End Sub
    The string compare is casessensitive. You can wrap the ChnPropValGet with a UCase to change this.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • Unable to perform search query against custom property

    Hi,
    I'm trying to perform search against specific property yet I'm getting empty result set.
    I have list with some data on it and the field in question has it's value filled. I done full crawl on the site and the crawled property is present under search administration. Property has "Enable full-text search" checked and I'm able to
    find these list items when I simply type something like 123 in the search box. Yet I'm unable to perform search against that property using syntax like
    DocumentNumber:123.
    According to this
    http://msdn.microsoft.com/en-us/library/office/ee558911.aspx I need to setup managed properties first so I did. I created required managed property called
    DocumentNumber I checked Searchable and Queryable boxes on and mapped it to crawled property. After that I performed full crawl again as it is required (http://technet.microsoft.com/en-us/library/jj219667.aspx)
    but still unable to retrieve result when performing search against specific property. I does however return results when I perform search against default columns like
    Created or Author.
    Some guy had similar issue
    http://social.msdn.microsoft.com/Forums/en-US/1f9782ca-5105-4802-b477-ccdee392c6eb/keyword-query-search-on-custom-managed-property yet that solution does not work for me. I tried it with SharePoint 2013 Search Query Tool and it returns nothing.
    Queries I performed:
    123 - returns required results.
    DocumentNumber:123 - no results.
    ows_DocumentNumber:123 - no results.
    Any ideas what I'm missing?

    According to this
    http://msdn.microsoft.com/en-us/library/office/ee558911.aspx I need to setup managed properties first so I did. I created required managed property called
    DocumentNumber I checked Searchable and Queryable boxes on and mapped it to crawled property. After that
    I performed full crawl again as it is required (http://technet.microsoft.com/en-us/library/jj219667.aspx) but still unable to retrieve result when performing search
    against specific property.

  • How can I do document query from custom portal

    I am think of creating a taskflow to do document query in UCM. How can I do that? Is there any web service from UCM to do that? Thanks.

    The GET_SEARCH_RESULTS is the standard search service in WCC.
    All of the needed information can be found in the Services Reference Guide, which is on the documenatation homepage:
    http://docs.oracle.com/cd/E23943_01/webcontent.htm
    Let us know if this helps!
    -ryan

  • Basic question: Can OID map LDAP query to custom SQL query?

    Hi all,
    I have custom data in my Oracle Database and I wat to give them
    LDAP interface. Is it possible to use OID to achieve this or OID
    is for other purposes?
    To be more specific: I have schema MYSCHEMA and table
    MYSCHEMA.MYTABLE. Is it possible to configure OID to select from MYSCHEMA.MYTABLE for specific LDAP queries? And the same for update queries? Is there some OID manager console to map LDAP queries against Oracle tables and views?
    Thanx for any suggestions,
    Rob

    Rob,
    take a look at the Directory Integration Platform. We provide synchronization of data from an DB tables to OID.
    see "Synchronization with Relational Database Tables" http://download-west.oracle.com/docs/cd/B14099_14/idmanage.1012/b14085/odip_db.htm#i1042820
    another option could be to use the OID Plugin framework together with a PLSQL procedure to access the DB data
    http://download-west.oracle.com/docs/cd/B14099_14/idmanage.1012/b14087/svrplgin.htm#i741028
    regards,
    --Olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adding Custom Property to Files

    I am trying to add a custom property to file in a repository and I am apparently missing something.
    I have created a custom property and and metadata extension for the language files. I add the property to the property group custom. I added the custom property to the folder display under presentations fine.
    The issue is when I hit the details of the files I can not find anywhere where my customer property show up...
    Any ideas??
    D.

    Hi Derek,
         Looks like you have done everything correctly. The property should show up under custom tab. I would recommend going through the following PDF and see if you missed anything.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/working with metadata properties in km.pdf

  • Is it possible to customizer entity custom property input interface?

    Hi,
    I have made a customize validatioin rule and a swing which used to input validation rule parameter. When I costomize validation rule parameter,I only need to do supply three file :
    PLSQLRule.java,PLSQLRuleBeanInfo,PlsqlRuleCustomizer.java,and then registered in project setting,but how can supply a swing to input custom property within entity xml file just like validation rule do?Who could help me?
    thanks advance
    lixinzhu
    2007/09/12

    hi,
    Does anyone has any idea?
    Thanks a lot
    lixinzhu
    2007/10/08

  • How can I filter a table from Data Control without enter query

    I have a table from a web service data control based on WSDL.
    I want to filter the table without input query at filter text box. Without filter text box, each would filter the table with a hardcoded query internally.
    For example, when user click A menu button then it filters the table where type = '1' and B menu button filters the table by type='2' and C menu button filters the table by type=' ' .
    How can I filter the table without enter query?
    Could anyone point me to a solution please.
    Thanks.
    jdev 11.1.5
    Edited by: 893364 on Oct 26, 2011 12:15 PM
    Edited by: 893364 on Oct 26, 2011 12:21 PM

    Hi,
    when you created the table, did you try selecting the "filter" option. Select the table and go to the Property Inspctor. In the tool bar of the Property Inspector there is an icon to change the configuration. Its adding filter filter fields for the user to search in.
    Option 2: The data of the Web Service actually is held in the iterators. If you wanted to filter the WebService query, I would not use the WS DC but a JAX-WS proxy in a POJO to fetch the WS Data. Then have the Data Control created from the POJO. You could have a method exposed on the POJO that allows you to filter the internally held data
    Frank

  • Sharepoint 2013 :Content Search Web part Property Filter By Query String - How to use ?

    Hi,
    I would like to filter data that is displayed in content search web part  by using  URL.
    I tried to use Value of a parameter from a URL - Query String.Parameter1
    But have no idea how to use it.
    Can someone help me pleas ?

    duplicate thread
    http://social.msdn.microsoft.com/Forums/en-US/f9fef155-1aa3-43b5-b285-5eae5d036b8d/content-search-webpart-property-filter-by-query-string-how-to-use-?forum=sharepointgeneral
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • How can I add a custom property to an object, like a paragraph?

    Hi,
    We have a merge process that combine multiple document into one and I need to store the filename of the imported file at the beginning of each merge point.   Each document that we merge contains a Title paragraph and I was wrongly assuming that I could set the label property of this paragraph with my value for future references, but only to find out that the paragraph object doesn't have a label property.
    I also tried setting a custom property by doing this
    paragraph.properties["myCustomProperty"] = "value";
    It doesn't crash, but if I try reading the value it is always undefined.
    I'm looking for alternative, or on how would you approach this, can you please advice?
    Your help is much appreciated.
    Thanks

    Peter Kahrel wrote:
    You could label the paragraph's parent story. Is that any good?
    Peter.
    Well I tought about it, but then I have to find a way to keep track of which paragraph this value belongs to and so far I havent found a way to uniquely identify a paragraph and I can't assume that the merged document won't be edited so I can't use the index.
    Peter Kahrel wrote:
    Otherwise use a paragraph property that you never use and that doesn't affect composition, such as .bulletsTextAfter
    P.
    It may be an alternative, but that may cause problem in the furture if they ever decide to use or change that properties.  Plus, I'm not sure if can put anything I want in there, but that would be worth the try.

  • Can you filter a custom report by postcode?  I want to send an email marketing campaign to customers

    Can you filter a custom report by postcode?  I want to send an email marketing campaign to customers within a postcode range.  How do you do this? Thanks.

    Hey RP in Oz,
    You can run a contacts report and select 'Default Address Type' as an 'Address Details Field' which will include the zip code a customer has inputted. You can then export the report, open it up in Excel (or similar) and filter based on the postcode. Once you have modified the list in excel, formatted it correctly and are satisfied, you can then import the report as a mailing list via E-Mail Marketing > Mailing Lists.

  • Retrieve custom property for a community

    How would you retrieve a custom property set on a Community? Is there an equilavent PT tag similar to the "pt:userInfo" tag?
    Any info would be appreciated!--jason

    We went a different route to obtain custom properties. However, when using the QueryObjects method, you have to pass it the folder id. How would go about retrieving the current folder id?
    Thank you again!--JasonFTN Financial
    Here is the code we are using:
    Dim oPortletcontext As Plumtree.Remote.Portlet.IPortletContextDim oPortletManager As Plumtree.Remote.PRC.IObjectManagerDim oExtendeddata As Plumtree.Remote.PRC.IExtendedDataDim oQuery As Plumtree.Remote.PRC.IObjectQueryDim oRow As Plumtree.Remote.PRC.IObjectQueryRow
    oPortletcontext = Plumtree.Remote.Portlet.PortletContextFactory.CreatePortletContext(Request, Response)
    oPortletManager = oPortletcontext.GetRemotePortalSession.GetObjectManager(Plumtree.Remote.PRC.ObjectClass.Community)
    oQuery = oPortletManager.QueryObjects(353)oRow = oQuery.GetRow(0)oExtendeddata = oRow.GetExtendedData
    response.write(oExtendeddata.GetValue("Reference Number"))

  • How can I get the value of a custom property from a resource object?

    I am trying to get the value(s) of a custom property, called "status" within a method. The method has an object of type IResource available to it.
    I have tried the following:
    PropertyName propName = new PropertyName("","status");
    value = res.getProperty(propName).toString();
    However, I am getting a NullPointerException when I try to create the PropertyName instance.
    Is there a better way to get the value of a specific property from a resource object?
    Thanks,
      Tom

    Thanks Praveen.
    I was missing the default namespace of "http://sapportals.com/xmlns/cm" - I thought I could just pass an empty string for the namespace, but it looks like I must always specifiy, even if it is default.
    Tom

  • How do I map custom property from portal api ptsearchresponse?

    I want to map the search results to my datatable.
    I can execute the search fine. But how do I map the property value? My property id is 101.
    In other words which ptSearchResponse method do I use?
                    IPTSession ptSession;
                    IPTSearchRequest ptSearchRequest;
                    IPTSearchResponse ptSearchResponse;
                    IPTSearchQuery ptSearchQuery;
                    string serverConfigDir = ConfigPathResolver.GetOpenConfigPath();
                    IOKContext configContext = OKConfigFactory.createInstance(serverConfigDir, "portal");
                    PortalObjectsFactory.Init(configContext);
                    ptSession = PortalObjectsFactory.CreateSession();
                    ptSession.Connect(1, "", null);
                    // Create a SearchRequest object
                    ptSearchRequest = ptSession.GetSearchRequest();
                    // Set search settings (constraints)
                    // Set maximum results desired (100)
                    ptSearchRequest.SetSettings(
                    PT_SEARCH_SETTING.PT_SEARCHSETTING_MAXRESULTS, 100);
                    // Set the folder in which to search (array to support multiple folders)
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_DDFOLDERS,
                        new int[] { Convert.ToInt32(ConfigurationManager.AppSettings["DocumentFolderId"]) });
                    // Include subfolders of the folder
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_INCLUDE_SUBFOLDERS, true);
                    // Restrict search to just portal documents
                    // (not ALI Collaboration or ALI Publisher)
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_APPS, PT_SEARCH_APPS.PT_SEARCH_APPS_PORTAL);
                    // get documents only
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_OBJTYPES, new int[] { PT_CLASSIDS.PT_CATALOGCARD_ID });
                    // Request the intrinsic PT_PROPERTY_PROVIDERCLSID and custom property 101
                    ptSearchRequest.SetSettings(
                        PT_SEARCH_SETTING.PT_SEARCHSETTING_RET_PROPS,
                        new int[] { PT_INTRINSICS.PT_PROPERTY_PROVIDERCLSID, 101 });
                    //Use IPTFilter to create search filter with clause with two statements
                    IPTFilter ptFilter;
                    IPTPropertyFilterClauses ptFilterClause;
                    IPTPropertyFilterStatement ptFilterStmt1;
                    IPTPropertyFilterStatement ptFilterStmt2;
                    // Create the filter itself
                    ptFilter = PortalObjectsFactory.CreateSearchFilter();
                    // Create the filter clause
                    ptFilterClause = (IPTPropertyFilterClauses)ptFilter.GetNewFilterItem(PT_FILTER_ITEM_TYPES.PT_FILTER_ITEM_CLAUSES);
                    ptFilterClause.SetOperator(PT_BOOLOPS.PT_BOOLOP_OR);
                    // Attach it to the filter itself
                    ptFilter.SetPropertyFilter(ptFilterClause);
                    // Put two statements into the clause
                    ptFilterStmt1 = (IPTPropertyFilterStatement)
                        ptFilter.GetNewFilterItem(PT_FILTER_ITEM_TYPES.PT_FILTER_ITEM_STATEMENT);
                    ptFilterStmt1.SetOperand(101);
                    ptFilterStmt1.SetOperator(PT_FILTEROPS.PT_FILTEROP_CONTAINS);
                    ptFilterStmt1.SetValue(tbSearch.Text.Trim());
                    ptFilterClause.AddItem(ptFilterStmt1, ptFilterClause.GetCount());
                    ptFilterStmt2 = (IPTPropertyFilterStatement)
                        ptFilter.GetNewFilterItem(PT_FILTER_ITEM_TYPES.PT_FILTER_ITEM_STATEMENT);
                    ptFilterStmt2.SetOperand(1);
                    ptFilterStmt2.SetOperator(PT_FILTEROPS.PT_FILTEROP_CONTAINS);
                    ptFilterStmt2.SetValue(tbSearch.Text.Trim());
                    ptFilterClause.AddItem(ptFilterStmt2, ptFilterClause.GetCount());
                    // Make the filter into an actual search query
                    ptSearchQuery = ptSearchRequest.CreateAdvancedQuery(ptFilter);
                    // Run the search and return results
                    ptSearchResponse = ptSearchRequest.Search(ptSearchQuery);               
                    // How many things matched the search?
                    int totalMatches = ptSearchResponse.GetTotalMatches();
                    // How many items were returned? (Not necessarily all)
                    int returnedMatches = ptSearchResponse.GetResultsReturned();
                    // create DataTable and map results to
                    // datatable fields
                    DataTable dtSearchResults = new DataTable("Documents");
                    dtSearchResults.Columns.Add("Name");
                    dtSearchResults.Columns.Add("Excerpt");
                    dtSearchResults.Columns.Add("DocSubject");
                    dtSearchResults.Columns.Add("DocTopic");
                    dtSearchResults.Columns.Add("DocType");
                    dtSearchResults.Columns.Add("DocKeywords");
                    dtSearchResults.Columns.Add("Url");
                    dtSearchResults.Columns.Add("ImageURL");
                    DataRow dr;                                                                                                          
                    // Print the name of each result
                    for (int i = 0; i < returnedMatches; i++)
                        dr = dtSearchResults.NewRow();
                        String strName = ptSearchResponse.GetFieldsAsString(i, PT_INTRINSICS.PT_PROPERTY_OBJECTNAME);                  
                        String strText = ptSearchResponse.GetFieldsAsString(i, PT_INTRINSICS.PT_PROPERTY_OBJECTSUMMARY);
                        String strURL = ptSearchResponse.GetFieldsAsString(i, PT_INTRINSICS.PT_PROPERTY_DOCUMENTURL);
                        String strImageURL = ptSearchResponse.GetFieldsAsString(i, PT_INTRINSICS.PT_PROPERTY_OBJECTIMAGEUUID);
                        dr["Name"] = strName;
                        dr["Excerpt"] = strText;
                        dr["Url"] = strURL;
                        dr["ImageURL"] = "pt://images/plumtree/portal/public/img/sml" + strImageURL + ".gif";
                        dtSearchResults.Rows.Add(dr);
    Edited by [email protected] at 04/11/2008 7:26 PM
    Edited by [email protected] at 04/11/2008 7:27 PM

    Problem solved. I should use JsonObject instead of JSONObject :D 

  • People Search and a Custom Property

    I am trying to surface a custom property in the people search query results. For example,
    http://<servername:port>/_api/search/query?querytext='*'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31'
    I get XML results but when I look at the properties returned for each of the people result, there are no custom properties from user profile properties. How can I modify the custom properties so that they start showing in the XML results for people search?
    Rank, DocId, AboutMe, AccountName, BaseOfficeLocation, Department etc.
    Please let me know.
    Thanks!
    Update: I am using SearchExecutor class and its ExecuteQuery API.

    Hi,
    Thank you for your sharing! It will be beneficial to others in this forum who meet the same issue in the future.
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • How can I restore a old backup of playlist / music from iPod v1 and iPod v2?

    I got two old iPod v1and iPod v2. They are both working, well used, both of the got maximum HD sold at that time. I looked at one of my old backup and I got the playlists and music. I remember I spent hours (weeks) converting CD's,  manually typing i

  • USB vs USB2 on G4

    We're looking at printers, and the one we like so far connects via USB2. Unfortunately, our 2001-era G4 (533, think it's the Digital Audio model, OS X 10.3.9) sports only the older USB connections. I imagine this will work, only slower - correct? The

  • Receiver SOAP adapter - SPML message

    Hi All,           Could you advice how to construct the request spml message in receiver interface and adapter settings(communication channel) to generate the following sample SPML message: <spml:addRequest targetID=“Sleek” executionMode=“synchronous

  • Exporting to excel erases the contents of internal tables

    Hi All, I am creating a BSP application wherein i am exporting the data from my BSP pages to the excel sheet using oninputprocessing event. The issue is when i open the excel, it opens it in a separate url but after opening the excel when i try to na

  • Why does my user icon keep changing?

    Hi all, It's not the end of the world but annoying just the same - I set my user icon to one of the standard Lion icons when I first set up my new MacBook Air and later changed it via System Preferences to a different photo that I've stored on my har