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 

Similar Messages

  • How to pass PO customer fields from ECC to SUS ?

    Hi Gurus,
    We defined a customer PO field at ECC side and want to pass it to SUS and diaplay it in SUS PO, my question is, how to pass PO customer fields from ECC to SUS?
    Please advise.
    Thanks and best regards
    jack

    Hi jackytam  ,
    /people/yeusheng.teo/blog/2008/01/05/ordering-unit-vs-order-pricing-unit-in-srm-sus
    you make get some pointers
    regards,
    Neelima

  • How to call a Custom screen in portal from a Poratal UWL ??

    How to display a Custom screen which is developed in portal when a work item is executed through the
    portal-UWL ?.
      In detail....
         A custom screen has been developed in portals.
    Workflow triggers when a new item is created on the custom screen then the workitem gets populated in the respective approver Portal UWL(universal work list).
    when the workitem is executed from the UWL then it has to display the custom screen with its header data on the portal.

    Hi sampath,
    Thanks. I found that the redirection is not working
    properly at IIS end and changed the configuaration to
    make it work.
    Thanks a lot,
    Gopi

  • 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 to define a custome property in User Profile to Save Roles Sort priority ?

    Hi All,
    I have a requirement where in, user should get an option to decide his default tab(role), when he logs into portal.
    e.g.: If user1 and User2 is assigned with 2 roles namely Leave & Travel. User1 should be able to select Leave as his default tab and User2 should be able to select Travel as his default tab.
    I was thinking if I can store what use selects in a custom property and change the tabs through custom application.
    Please let me know how can achieve this in CE 7.3 portal.
    Thanks in Advance,
    Pavan.

    Hi Pavan,
    If you are using the AJAX framework page the user can simply drag the tabs and it will automatically be saved in the personalization.
    user should:
    1. place mouse over the role (in the top left corner you will see a triangle).
    2. place mouse over triangle and, push and hold down mouse button.
    3. drag the mouse to the navigation place where you want it to be (notice black line).
    4. leave the mouse button.
    Now the order of the tabs are saved in the personalization for that user only.
    Hope this is what you meant.
    BR,
    Saar

  • How to pass the selected Pernr from Portal to WDA iview dynamically ?

    Hi ,
    How we can pass the selected Pernr from portal page to the webdynpro application dynamically?
    Ex:
    If a manager select a employee id of an employee then it should display all the related document regarding the employee in the ivew.
    For that we need to pass the employee id(Pernr) to the iview.How it is possible.
    Thanks,
    Deepika

    Hi Deepika,
    Try using portal events. You will have to register and handle the required portal event in your WDA application.
    [Portal Events Help|http://help.sap.com/saphelp_nw70/helpdata/EN/03/0048413e466e24e10000000a155106/frameset.htm]
    In this link, navigate to Integration->portal integration->Portal Events.
    Also go through some sample applications:
    WDR_TEST_PORTAL_EVENT
    Regards,
    Reema.

  • How to invoke ADF custom application from existing R12 EBS application

    Hi Guru's,
    We have a requirement to invoke ADF custom application from existing EBS R12.1.3 application.
    Is there any documentation provided by ORACLE or any online help on how to integrate/invoke ADF pages from existing EBS application?
    And can we pass any EBS session level parameters like(user info, language, operating unit etc) to ADF layer while invoking the ADF application?
    I have thoroughly searched the forums and got some info related to JAAS security links and all. but i am looking for exact integration specific steps.
    Any help in this regard is a great help!!
    Thanks alot for your help!!
    Subba.

    lets raise your question over here
    JDeveloper and ADF
    Thanks
    vamshi.

  • How to close a custom form from CUSTOM.pll

    Dear Friends,
    We need your help on the following issue related to Oracle Apps Forms.
    We have a requirement to show a popup message (message should remain open and user should be able to continue working in the order entry form. User use this message as a reference while entering order details) when user enters a customer name or number in the order entry form . This is similar to the Stock Availability form which gets opened automatically when control enters into Order Entry Lines form, where the stock availability form remains open while entering line details.
    To fullfil the requirement, we have designed a custom form with a single text field in which the message text (some customer information) will be shown.
    We are using custom.pll to call this custom form (thru FND_FUNCTION.EXECUTE) when the control leaves customer number field. User could leave this custom form open and continue with entering order details. Till this point we could achieve what we want. i.e. we could show the popup message in the custom form after user enters a customer number.
    The problem is, after the custom form is opened, when we enter a new order for different customer, we need to close the custom form (which is opened for the previous customer) if the customer is not qualified.
    we could not achieve this. We tried using CLOSE_FORM, CLOSE_WINDOW, but did not help.
    Any body have any suggestions on achieving this... Basically, we need your help to know how we can close the custom form from CUSTOM.pll.
    Thanks,
    Uma

    I thing you haven't any (supported) option to close a form via custom.pll.
    For a long time, we have search a solution for the same problem without any result.

  • How to delete a customer complete from R/3

    Hi
        How can i delete a customer from R/3 complete.
        VD06 transaction only marks for deletion.
        I am able to create sales order after marking
        customer for deletion.
        I want to remove customer completely from the System
    Regards,
    Abhimanyu.L

    Hi
    You can delete a customer from database only if:
    - it runs archiving tools (for customer): here all customer setted to be deleted will be delete from database really;
    - it runs report SAPF019 (it's better to set the checkbox "Delete per deletion flag only"), I've never run it.
    Max

  • How to make a custom property editable/not editable in DRM

    Hi,
    How do we make a particular field i,e custom property category field as editable whereas make an another field i,e another custom propertyfield value as non editable in a same hierarchy within a particular version.
    user has an admin privilage in the above case.

    Hi,
    If the user is an admin he will have access to edit all properties...but before that... what do you exactly mean by making a property editable/non editable? The only non editable properties are the derived properties... if beyond that you need to make custom defined properties non editable you have to work with setting up the security where the very first step is to not to have normal users as admin in the system.
    Could you please detail out your requirement a bit more.
    Thanks
    Denzz

  • How to get the count property from the oData response

    Hi,
    I have a fullscreen view in my Fiori app where we call a oData service through table.bindItems() inside the controller.
    The binding of items works fine but we have a situation when we need to display the total number of items (for e.g. 515) on the UI. We do not get this information from the VDM, so we plan to use the length property of the getList() method to determine the total number of items. But because of growing feature of the table it only reads 100 items at a time and the length property returns only 100. I have attached the listener attachRequestCompleted() for the model so that once the bindItems() request is complete i can get the length property. But my problem is that i want the total count.
    I saw in the debug that when this table.bindItems() gets called it makes a oData service call and in the response i can see that there is a count property available which has the total number of items (515 for my e.g.) but how do i read this count property from the response inside my controller (probably inside my attachRequestCompleted)?? I would really appreciate any help in this regard. Thanks.
    Kind Regards,
    Ashish
    Tags edited by: Michael Appleby

    HI Chandra,
    Thanks for your suggestions.
    But i think in my case we do not want to get the complete list. We still want to get only 100 items initially and then if the user would scroll down he/she would see more items. But we already need to know the total number of items for the purpose of showing a message to the user. For e.g. Total issues (515),  but the table would initially show only 100 and then another 100 after scroll. So setting the size litmit to max would not help.
    And to be able to use the $count you mentioned, we have to still make another oData service call which we do not want.
    But as i mentioned there is already a property named "__count" in the response of the bindItems() method call and i see that it has correct count but not sure how to retrieve it inside the controller. Thanks.
    Regards,
    Ashish

  • How to add a custom property to the user's master record?

    Hello,
    I would like to add a custom property to the user's master record which is unique to our company (User's region).
    Is that possible? and if yes, how?
    I'm a bit new to BW so a step-by-step procedure will help
    Roy

    The user names are stored in table USR01. IN that table see if you can add a field to have region. Extract this table and store it in User info object in BW.
    You will need a ABAP person to do this, if you are new to SAP.
    Ravi Thothadri

  • How to query a custom picklist from Opportunity's revenue?

    Hello,
    I would like to query a custom picklist from Opportunity's revenue. I am using Picklist.wsdl:
    myPort.getPicklistValues(myPicklist, Revenue, "");
    With this operation I have the following message: denied acces. (SBL-ODS-50085).
    I have tested with another entity and it works perfectlly:
    myPort.getPicklistValues(myPicklist, Opportunity, "");
    So, I think the problem is in the entity name, so can I access to Opportunity's revenue¿?
    I am very confusing, because in Web Services documentation I have seen:
    NOTE: The Revenue child object of Opportunity is actually called Product.
    I have tested with:
    myPort.getPicklistValues(myPicklist, Product, "");
    But it isn't exists in this entity: SBL-SBL-00000
    The role has access to do the query via Web Service, because it is the administrator and with it I can do any other operation via Web Service...
    What I am doing wrong?
    Thank you and regards.

    I have found the answer:
    Objects Supported with getPicklistValues operation:
    GetPicklistValues is supported for all Web Services v1.0 and v2.0 accessible parent-level objects.
    Revenue is a child object, so I can interact with this operation :(

  • How to reference a custom property in a vo transient attribute expr + bug

    Hi all
    I have created a transient attribute with an expression that evaluate null content to replace it by a appropriate text.
    <ViewAttribute
        Name="DescriptionUI"
        IsUpdateable="false"
        IsSelected="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="VIEW_ATTR"
        SQLType="VARCHAR">
        <TransientExpression><![CDATA[((Description == null) ? 'Pas de description' : Description)]]></TransientExpression>
      </ViewAttribute>I have defined a custom property for that attribute that contains the message text. I was surprised to see that the custom property was not associate with the attribute in the source file. Don't understand where the association is done
        <Properties>
          <CustomProperties>
            <Property
              Name="flex.tree.noLabel"
              ResId="flex.noDescription"/>
          </CustomProperties>
        </Properties>I had some difficulties to use the custom property editor. When creating a new related one by using an existing resource the property column value is not changed and the content 'Property' is generated. Because no relationships exists between attribute and the property, the entry is lost in the table referring custom property list for the attribute when your come back into the view object or if you save an another entry in an another attribute.
    So my first question ? Is the attribute editing part the right part to define custom property pairs if they are not related to attributes ? is it a bug ?
    My second question is : is it possible to evaluate the bundle in the expression (replacing the literal 'Pas de description' by an expression) ? What is the expression to use ? Where it is described to do such things in the help or in the documentation ?
    Thank you

    This is wrong
    ((Label == null) ? {FlexParameterModelBundle['flex.tree.noLabel']} : Label)
    What is the correct syntax to refer to the project model standard bundle in the groovy expression ?
    Thank for the help !

  • How to invoke a custom adapter from a BPEL process

    Hi guys,
    I've implemented a custom outbound adapter and deployed successfully on Weblogic V.10.3.4.
    My current installation also consists of Oracle SOA Suite 11g / JDeveloper 11g (11.1.1.4.0)
    In the Weblogic administrator's console,
    *1.* I navigated to:
    Summary of Deployments -> AdapterName -> Configuration -> Outbound Connection Pools
    *2.* Selected: javax.resource.cci.ConnectionFactory and added new JNDI name for Outbound Connection Instance: "*eis/HelloWorld*"
    My task is to invoke the custom adapter from a BPEL process.
    I altered the customAdapter-config.xml so as to be able to use custom adapter wizard from JDeveloper's "Service Adapters" palette,
    and fullfilled the custom adapter wizard's fields accordingly. The 3rd step of the wizard requires Connection Information.
    I added: "*eis/HelloWorld*" in the "*Connection Factory Location*" field.
    Deployed BPEL process successfully, but testing failed due to binding.jca-12510 error:
    "The JCA Binding Component was unable to establish an outbound JCA CCI connection due to the following issue: BINDING.JCA-12510 JCA Resource Adapter location error. Unable to locate the JCA Resource Adapter via .jca binding file element <connection-factory/> The JCA Binding Component is unable to startup the Resource Adapter specified in the <connection-factory/> element: location='eis/HelloWorld'. The reason for this is most likely that either 1) the Resource Adapters RAR file has not been deployed successfully to the WebLogic Application server or 2) the '<jndi-name>' element in weblogic-ra.xml has not been set to eis/HelloWorld. In the last case you will have to add a new WebLogic JCA connection factory (deploy a RAR). Please correct this and then restart the Application Server "I tried to apply (just for testing) "eis/FileAdapter" in the "Connection Factory Location" field of the custom adapter wizard,
    and BPEL successfully invoked the adapter.
    Any ideas ?
    Thanks,
    George

    George, What deployment do you have this associated with?
    - D.J.

Maybe you are looking for

  • How to get the URL of the window which is opened as a dialog

    Hi All, I am working on BPM Worklist and in BPM Worklist we have created a Custom ADF Application. What BPM Worklist does is :- it shows the task associated to the user and when user double click on the task , it opens the custom ADF Page created by

  • How do you turn off the Mac book pro monitor when using dual monitors?

    How do you turn off the monitor on the mac book pro and only see your second monitor?

  • BW drill down report

    Hi friends, I have built a query which is analytical, now the business wants it to be a drill down. How can i make this drill down report? Can any please help me. Thanks in advance. Regards Ananth

  • BT Billing Confusion

    I spent ages on the phone today and eventually got through to BT. I had been happily paying my monthly bill without a care until recently. I'm out of work so I've been doing a budget and reviewing my spending. Anyway, I'm on: Unlimited Broadband whic

  • Include files from a different project ...

    Hi, I have projects A and B. Project A contains "includes": a directory with several include files. Project A gets deployed as a JAR file (ProjectA.jar). Example content:   /includes/menu.jspfThe target directory for Project A's deployment JAR file i