Retrieve resources ordered by a custom property value

Hi guys,
I'm newbie in SAP development and I have the following problem.
I have developed a custom Java servlet which runs in SAP Portal NetWeaver '04; now, I need to retrieve a set of files in a specific RID but, they have to be ordered by a value of a custom property: does anyone can show me the way to do that?
Is it possible to give a kind of sorting like "descendent" or "ascendant"?
Best regards,
Paolo

Hello Paolo,
I don't think you can do sorting of KM Resources with your custom property.
My advice would be to retrieve all the Resources (Files) and do the comparing/sorting in your servlet.
Ofcourse you can use the standard java class Comparator to do this, check this for more:
How do you sort on IGroup's group name?
Greetings,
Praveen Gudapati
p.s Points are always welcome for helpful answers

Similar Messages

  • Set list custom property value on creation

    I have a list template created, and a custom action that exposes a settings page. On the settings page, I can read / set a custom list property. I would like to be able to set the property when I'm creating the list (and have a similar requirement when
    creating a site). Is there any way to expose the custom property to the "New list" dialog (Silverlight)?

    Hi Ahmad,
    Could you please follow the below steps to get ALL to the top:
    -Edit the objects properties for which you want to apply condition.
    -Click on SQl editor and check the option don't generate sql
    -Write the sql as follows:
    SELECT DISTINCT
    TABLE NAME.COLUM NNAME
    FROM
      TABLE
    UNION
    SELECT '*ALL' FROM TABLE
    For Example:
    SELECT DISTINCT
      EMP.ENAME
    FROM
      EMP
    UNION
    SELECT '*ALL' FROM EMP
    __-Create a pre defined condition in universe_:
    @Select(Emp\Ename) IN @Prompt('VAL',A,'Emp\Ename',MULTI,FREE) OR '*ALL' IN @Prompt('VAL',A,'Emp\Ename',MULTI,FREE)
    Note: Use '*ALL' insted of 'ALL'

  • Custom property values does not show in XML forms!

    Hi All
    I have created a property in the portal which has multiple values, I have added these values in the 'Allowed Values' section. Then in my XML form I reference this property in a combo box. I have restarted the j2EE engine and opened the form and the properties are not displayed in the combo box it is blank!
    Does anyone know why?
    Thanks in advance!

    Thanks anyways...

  • 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;

  • 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 retrieve a property value from an iview in the back-end?

    Hi,
    I am looking for a back-end function module or any other way to retrieve the property value of an iview in the portal.
    Is this possible?
    thanks,
    Bert Caryn

    Hi,
    Look at the following threads,
    For programmatically getting the iview properties,
    Programmatically getting iView Properties
    Also,
    Get Properties of IView Programmatically
    Permanent change of iView property programmatically
    Hope these threads help u.
    Regards
    Srinivasan T

  • How to Retrieve Purchase order TAX value price

    Hi,
    I want to retrieve Purchase order TAX value price from the purchase order is there any function module to retrieve this value.  Or from which table we can retrieve this value using purchase order no.
    Thanks in advance

    Hi Pradeep,
    Have you looked BAPI <b>BAPI_PRICES_CONDITIONS</b>?
    Hope this will help.
    Regards,
    Ferry Lianto

  • Custom property renderer for multiple value selections of property metadata

    Hi,
    We have created custom predefined metadata properties and fetching data from SAP to display values while uploading a document from KM.Everything is working fine and values are being displayed in a dropdown.
    The standard property multi-valued displays values in checkboxex but the requirement is to allow for multiple selections in dropdown using shift ot ctrl key.
    We started creating our own property renderer by decompiling classes like allowedvalues_multivalued
    but we could not see the property on the upload screen.
    Any help is greatly appericiated.
    Thanks,
    Vasu.

    Vasu,
    Try changing the property renderer setting in your custom property.  There might be one which allows a multiple select box.  If not, you can always create your own.  The following links are helpful:
    https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5800
    https://www.sdn.sap.com/irj/sdn/nw-cm?rid=/library/uuid/f7b176eb-0701-0010-2b84-8edb1f76771d
    Andrew

  • 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"))

  • Create a resource filter and add/redefine a property value to a resource?

    Hello,
    I need an advice how to create a resource filter and add a property to a resource. I already created the project and after creating myfilter.java automatically by using the "Service, filter and scheduler taks generation" in my developer studio, there's a filter() method where the filtering has to be implemented. Here I need an example how to read the resource path and add or redefine a property value. (In this case the property value depends on the resource path) So I also need to know, how to get the ressource path. Can anybody please support me with some example code?
    Thanks in advance
    Cheers
    Steffen

    Hi Jaiswin,
    I need to enter 3 formula:
    Setup
    Production
    Teardown
    In PP this is standard but in PP-PI Resource I only see one field 'other formula'.
    How do I enter more then one formula?
    Can it be done in PP-PI?
    Thanks
    Stuart

  • "Property value is not valid" when PropertyGridView tries to convert a string to a custom object type.

    Hi,
    I have a problem with an PropertyGrid enum property that uses a type converter.
    In general it works, but when I double clicking or using the scoll wheel,  an error message appears:
    "Property value is not valid"
    Details: "Object of type 'System.String' cannot be converted to type 'myCompany.myProject.CC_myCustomProperty."
    I noticed that the CommitValue method (in PropertyGridView.cs) tries to convert a string value to a CC_myCustomProperty object.
    Here is the code that causes the error (see line 33):
    (Using the .net symbols from the PropertyGridView.cs file)
    1
            internal bool CommitValue(GridEntry ipeCur, object value) {   
    2
    3
                Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose,  "PropertyGridView:CommitValue(" + (value==null ? "null" :value.ToString()) + ")");   
    4
    5
                int propCount = ipeCur.ChildCount;  
    6
                bool capture = Edit.HookMouseDown;  
    7
                object originalValue = null;   
    8
    9
                try {   
    10
                    originalValue = ipeCur.PropertyValue;   
    11
    12
                catch {   
    13
                    // if the getter is failing, we still want to let  
    14
                    // the set happen.  
    15
    16
    17
                try {  
    18
                    try {   
    19
                        SetFlag(FlagInPropertySet, true);   
    20
    21
                        //if this propentry is enumerable, then once a value is selected from the editor,   
    22
                        //we'll want to close the drop down (like true/false).  Otherwise, if we're  
    23
                        //working with Anchor for ex., then we should be able to select different values  
    24
                        //from the editor, without having it close every time.  
    25
                        if (ipeCur != null &&   
    26
                            ipeCur.Enumerable) {  
    27
                               CloseDropDown();   
    28
    29
    30
                        try {   
    31
                            Edit.DisableMouseHook = true;  
    32
    /*** This Step fails because the commit method is trying to convert a string to myCustom objet ***/ 
    33
                            ipeCur.PropertyValue = value;   
    34
    35
                        finally {   
    36
                            Edit.DisableMouseHook = false;  
    37
                            Edit.HookMouseDown = capture;   
    38
    39
    40
                    catch (Exception ex) {   
    41
                        SetCommitError(ERROR_THROWN);  
    42
                        ShowInvalidMessage(ipeCur.PropertyLabel, value, ex);  
    43
                        return false;  
    44
    I'm stuck.
    I was wondering is there a way to work around this? Maybe extend the string converter class to accept this?
    Thanks in advance,
    Eric

     
    Hi,
    Thank you for your post!  I would suggest posting your question in one of the MS Forums,
     MSDN Forums » Windows Forms » Windows Forms General
     located here:http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=8&SiteID=1.
    Have a great day!

  • 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 !

  • Adding Custom Property in Catalog

    Hi all,
    trying to add a new property in the product and SKU level. I have added the below code in custom catalog.xml.
    And the below SQL script, i have got by invoking the following like in . In dyn/admin , atg/commerce/catalog/productcatalog , generate SQL link...
    but i am getting the following error when executing the SQL script.
    Pls let me know the best way to add a custom property in catalog, n generate SQL for same
    <item-descriptor name="product" id-space-name="product" xml-combine="append">
    <table name="abc_product" type="auxiliary" id-column-name="product_id">
    <property name="isABC" data-type="boolean" default="false" column-name="abc"
    category-resource="SIM" display-name-resource="abc">
    <attribute name="propertySortPriority" value="-1"/>
    </property>
    </table>
    </item-descriptor>
    -------------------------------------------------------Error when executing script----------------------
    Error starting at line 1 in command:
    CREATE TABLE abc_product (
         product_id           varchar2(254)     NOT NULL REFERENCES dcs_product(product_id),
         abc           number(1)     NULL,
         CHECK (abc IN (0, 1)),
         PRIMARY KEY(product_id)
    Error at Command Line:2 Column:61
    Error report:
    SQL Error: ORA-02270: no matching unique or primary key for this column-list
    02270. 00000 - "no matching unique or primary key for this column-list"
    *Cause:    A REFERENCES clause in a CREATE/ALTER TABLE statement
    gives a column-list for which there is no matching unique or primary
    key constraint in the referenced table.
    *Action:   Find the correct column names using the ALL_CONS_COLUMNS
    catalog view

    @Gurvinder,
    I changed the DDL/SQL script. this script worked in CATAA/CATAB schema, But failed in Publishing schema. Find the problem below in publishing schema.
    CREATE TABLE abc_product (
    product_id varchar2(254) NOT NULL,
    abc_uin number(1) NULL
    ,constraint sim_product_pk primary key (product_id)
    ,constraint sim_product_f1 foreign key (product_id) references dcs_product (product_id));
    -----------------------CATA Schema-------
    CONSTRAINT "DCS_PRODUCT_C" CHECK (nonreturnable in (0,1)) ENABLE,
         CONSTRAINT "DCS_PRODUCT1_C" CHECK (disallow_recommend in (0,1)) ENABLE,
         CONSTRAINT "DCS_PRODUCT_P" PRIMARY KEY ("PRODUCT_ID") // there there is only one primary key
    ------Publishing Schema----------------------------------
    CREATE TABLE "ATGSIMPUB"."DCS_PRODUCT"
    (     "ASSET_VERSION" NUMBER(19,0) NOT NULL ENABLE,
         "WORKSPACE_ID" VARCHAR2(40 BYTE) NOT NULL ENABLE,
         "BRANCH_ID" VARCHAR2(40 BYTE) NOT NULL ENABLE,
         "IS_HEAD" NUMBER(1,0) NOT NULL ENABLE,
         "VERSION_DELETED" NUMBER(1,0) NOT NULL ENABLE,
         "VERSION_EDITABLE" NUMBER(1,0) NOT NULL ENABLE,
         "PRED_VERSION" NUMBER(19,0),
         "CHECKIN_DATE" TIMESTAMP (6),
         "PRODUCT_ID" VARCHAR2(40 BYTE) NOT NULL ENABLE,
         "VERSION" NUMBER(*,0) NOT NULL ENABLE,
         "CREATION_DATE" TIMESTAMP (6),
         "START_DATE" TIMESTAMP (6),
         "END_DATE" TIMESTAMP (6),
         "DISPLAY_NAME" VARCHAR2(254 BYTE),
         "DESCRIPTION" VARCHAR2(254 BYTE),
         "LONG_DESCRIPTION" CLOB,
         "PARENT_CAT_ID" VARCHAR2(40 BYTE),
         "PRODUCT_TYPE" NUMBER(*,0),
         "ADMIN_DISPLAY" VARCHAR2(254 BYTE),
         "NONRETURNABLE" NUMBER(1,0),
         "BRAND" VARCHAR2(254 BYTE),
         "DISALLOW_RECOMMEND" NUMBER(1,0),
         "MANUFACTURER" VARCHAR2(40 BYTE),
         CONSTRAINT "DCS_PRODUCT_C" CHECK (nonreturnable in (0,1)) ENABLE,
         CONSTRAINT "DCS_PRODUCT1_C" CHECK (disallow_recommend in (0,1)) ENABLE,
         CONSTRAINT "DCS_PRODUCT_P" PRIMARY KEY ("PRODUCT_ID", "ASSET_VERSION") //there is two primary keys
    Regards
    Edited by: Bravo on Apr 22, 2013 5:23 AM

  • SharePoint Online - I cannot move my custom property any higher than PicturePlaceholderState

    I cannot move my custom property (User Profile) any higher than PicturePlaceholderState - reordering just doesn´t work. Any ideas, how I can achieve this?
    thx
    Haider

    You are not able to move the property order any higher because there are duplicate display order values for your properties. The display order of the property that you are trying to move currently has the same display order as property "SPS-PicturePlaceholderState".
    You can use the following Powershell script that will allow you to see the current display orders of your properties as well as modify the display order of any of your properties.
    function ListUserProfilePropertyDisplayOrder($siteUrl){
    $site = Get-SPSite $siteUrl
    $context = Get-SPServiceContext $site
    $upcManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager($context)
    #if you have other profile sub-types than the default profile sub-type name ("User"), you will need to change the following line and use the name of the desired profile sub-type
    $defaultUserProfileSubTypeName = [Microsoft.Office.Server.UserProfiles.ProfileSubtypeManager]::GetDefaultProfileName("User")
    $upcManager.ProfilePropertyManager.GetProfileSubtypeProperties($defaultUserProfileSubTypeName) | Format-Table -Property Name,DisplayName,DisplayOrder
    #Example Usage
    ListUserProfilePropertyDisplayOrder http://your.site.url
    function ModifyUserProfilePropertyDisplayOrder($siteUrl, $propertyName, $displayOrder){
    $site = Get-SPSite $siteUrl
    $context = Get-SPServiceContext $site
    $upcManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager($context)
    #if you have other profile sub-types than the default profile sub-type name ("User"), you will need to change the following line and use the name of the desired profile sub-type
    $defaultUserProfileSubTypeName = [Microsoft.Office.Server.UserProfiles.ProfileSubtypeManager]::GetDefaultProfileName("User")
    $profileSubtypePropManager = $upcManager.ProfilePropertyManager.GetProfileSubtypeProperties($defaultUserProfileSubTypeName)
    $profileSubtypePropManager.SetDisplayOrderByPropertyName($propertyName, $displayOrder)
    $profileSubtypePropManager.CommitDisplayOrder()
    #Example Usage
    ModifyUserProfilePropertyDisplayOrder http://your.site.url TargetPropertyName DesiredDisplayOrder

  • Customizing Property of Business Graphics UI Element

    Hello Web DynPro Developers,
    I'm trying to implement a dynamicly created Business Graphic. In order to set the properties for the "Series" (which will normaly be set through the Chart Designer) i try to deliver a XML Customizing File with the customizing properties.
    The API Documentation says that this property requieres a  URL which points to a valid XML file.
    After setting the Customizing property to a URL with an XML Configuration, the J2EE Engine does not try to retrieve the XML document (traffic watch).
    Is this a not implemented feature? How to set the configuration of Business Graphic dynamically?

    Dear Kai,
    Thanks a lot for your response.
    1. According to your suggestion (note 531668), it has been found that XMLCHART is already installed on our Integrated IGS server.
    2. According to note 1028690, it has been found that "IGS 6.40 with patch level 19 or higher" should be available, but in our case we have "IGS 6.40 with patch level 16". Now what I would like to inquire is that does upgradation have any side effects on server?
    For your information I would like to clear you that I want to use Vrinda font (its a standard font), but at present font shown in the chart is Arial.
    Do we need to install some other Interpreter (eg. GFWCHART)? or some thing else is required to show the desired standard font?
    Regards,
    Nittin

Maybe you are looking for