Update property metadata

Hi,
I transfered a KM folder from one portal to another.
How can I set propety metadata from one namespace to another by code?
For example I have a metadata called "Name" under namespace "http://mydomain1".
The documents I transfered have metadata called "Name" under namespace "http://mydomain2".
How can I copy the metadata from the first namespace to the second by code?

Hi,
Try something like this:
IPropertyName PropNameOld = PropertyName.getPN("http://mydomain1", "Name");
IPropertyName PropNameNew = PropertyName.getPN("http://mydomain2", "Name");
IProperty PropOld = resource.getProperty(PropNameOld);
IProperty PropNew = new Property(PropNameNew, PropOld.getStringValue());
if (resource.isVersioned()) {
     IMutablePropertyMap mutPropMap =
     resource.getProperties().getMutable();
     mutPropMap.put(PropNew);
     IContent res_content = resource.getContent();
     if (!resource.isCheckedOut()) {
          resource.checkOut();
     resource.checkIn(res_content, mutPropMap, true);
} else {
     resource.setProperty(PropNew);                    
Best Regards,
Avishai Zamir

Similar Messages

  • How to update managed metadata column for all file in document library using powershell

    Hi,
    How to update managed metadata column for all file in document library using powershell?
    Any help on it.
    Thanks & REgards
    Poomani Sankaran

    Hi TanPart,
    I have changed the code which you have give in order to get the files from SharePoint 2010 Foundation  Document Library.But i am getting below error in powershell.
    Property 'ListItemCollectionPosition' cannot be found on this object; make sure it exists and is settable.
    Could you tell me which is the issues in it?
    See the code below.
    $web = Get-SPWeb http://ntmoss2010:9090/Site
    $list = $web.Lists["DocLib"]
    $query = New-Object Microsoft.SharePoint.SPQuery
    $query.ViewAttributes = "Scope='Recursive'";
    $query.RowLimit = 2000
    $caml = '<Where><Contains><FieldRef Name="Title" /><Value Type="Text">Process Documents/Delivery</Value></Contains></Where>' +
            '<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
    $query.Query = $caml
    do
        $listItems = $list.GetItems($query)
        $spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
        foreach($item in $listItems)
            #Cast to SPListItem to avoid ambiguous overload error
            $spItem = [Microsoft.SharePoint.SPListItem]$item;
            Write-Host $spItem.Title       
    while ($spQuery.ListItemCollectionPosition -ne $null)
    Thanks & Regards
    Poomani Sankaran

  • Updating KM Metadata properties using KM API

    Hi All,
    We are tring to update the custom Metadata properties using KM API from the Abstract Portal Component.
    We have written the below code for updating the metadata.
    We have checkbox called "Region" which has multiple option values like "Asia,America,Europe". I was able to update this property with single value. But when i try to update with multiple value it is not working. I tried with comma seperated but it didn't work.
    Can somebody through light on this. How to update multiple values?
    Code snippet
    IUserManagementService service=(IUserManagementService)PortalRuntime.getRuntimeResources().getService(IUserManagementService.KEY);
              com.sapportals.portal.security.usermanagement.IUser user =null;
                   user= service.getDefaultFactory().getEP5User(request.getUser());
    IResourceContext context = new ResourceContext(user);
    RID path = RID.getRID("/documents/src/ex1.doc");
                        IResource res = ResourceFactory.getInstance().getResource(path,context);
                        IPropertyName propName = new PropertyName("http://ars.com/xmlns/cm","Region");
                        IMutablePropertyMap map = new MutablePropertyMap();
                        IProperty property = new Property(propName,"Asia");//How to pass multiple Values?
                        map.put(property);
                        res.setProperty(property);
    Helpful answer would be appreciated and Rewarded....
    Regards,
    Birla.

    Hi Birla,
    try this:
    IResource res = ResourceFactory.getInstance().getResource(path,context);
    IPropertyName propName = new PropertyName("http://ars.com/xmlns/cm","Region");
    java.util.List values = new List();
    values.add("Asia");
    values.add("America");
    values.add("Muenster, Germany");
    IProperty property = new Property(propName, PropertyType.STRING, values);
    res.setProperty(property);
    Best regards,
    Michael

  • Property Metadata don't change when deploying project

    Hi,
    1.) I used this help http://help.sap.com/saphelp_nw2004s/helpdata/en/44/2dff5a13363f0ae10000000a114a6b/content.htm
    to create my own commands, uicommands, etc.
    2.) I also created manually in: System Administration => System Configuration => Knowledge Management => Content Management => Global Services => Property Metadata my own properties to extend the userdetails like described in http://help.sap.com/bp_epv170/EP_US/Documentation/How-to/KM/Extending_User_Details.pdf
    This all works perfectly.
    Instead of creating and exporting all my Property Metadata manually I exported them (I have now a XML) and integrated them into my Project => see 1.)
    I also found this post: https://www.sdn.sap.com/irj/sdn/message?messageID=3533233
    So, when I deploy my project and the properties aren't existing the are created immediately. BUT when I change something in the property metadata XML in my project and I redeploy the project the existing property doesn't change.
    I don't want to delete everytime all my properties to make changes active.
    With uicommands I don't have this problems. When I change there something I can deploy the project, new uicommands will be added and existing ones will be updated. Unfortunately not by property metadata.
    Do you have any ideas why this happens?
    Regards,
    Stefan

    Hello Stefan,
    you might have a versioning problem when merging the new KM configuration from your project with the existing configuration in KM. That would explain why everything works fine if you delete the existing settings first but it won't if you try to overwrite the existing settings!
    KM merges the configuration when you deploy a PAR file with configuration. You need to tell the system that the settings in the PAR file should replace the existing settings. This can be done by including the file export_cm_mapping.xml into your project. (At least that is the name of the file in NW04). You can get this file by exporting some configuration from your KM system with the KM export functionality and unzip the resulting configarchive file. It should contain the correct export_cm_mapping.xml file. Just take this file and put it into the src.config directory in the same path. (For NW04 that is: src.config/install/data/system/command/export_cm_mapping.xml.)
    Hope this helps,
    Martin

  • How to insert a space-bar in the Muse CC master slide page property metadata

    I'm using the latest version of Muse CC and need to know how to insert a space-bar in the master slide page property metadata page title suffix area

    I found it.  If anyone else has this problem press the shift and \ at the same time on a standard windows keyboard.

  • Changing the Updatable property of a View Object Attribute through code

    Hi,
    Is there a way to set the "Updatable" property of an attribute in a view object through code ?
    I checked the API docs for the AttributeDef class but there is no method to set this. there is a constant (UPDATEABLE_WHILE_NEW) which gives the current value.
    My requirements in short - I have a ADF editable Table. Based on a flag whether it is SET or NOT, i need to make a particular column such that the inputTextBox on this column must appear for only the new rows inserted into the table. For all the existing rows users should not be allowed to edit values on this column.
    I know this can be controlled with the UPDATABLE property on the attribute in the view object by setting the value as "WHILE  NEW".
    Now i need to control this through code at runtime.
    Please let me know on ow to do this.
    JDev version: 11.1.2.3
    Thanks.

    the method you are looking for is available in the AttributeDefImpl class which you can get from the EntityImpl like
    this.mDefinitionObject.getAttributeDefImpl("YOUR_ATTRIBUTE_NAME").setUpdateableFlag(AttributeDef.UPDATEABLE_WHILE_NEW);
    Timo

  • Updatable property of Calculated Field in ViewObject does not work

    Hello,
    I have set the Updatable property of some ViewObject attributes to "while new".
    In the page those attributes are shown as <af:inputListOfValues> components.
    When creating a new row, those components properly appear as enabled and let me insert any values, since the row is new.
    However, after a following commit, once the table in the page is refreshed, I still see some components enabled on the row I committed before. This only happens with attributes based on calculated fields, not with those based on real table fields, as if the "while new" property specified on the ViewObject calculated fields was ignored.
    Do you know why? Is there a solution or work around?
    Below are the ViewObject XML section and the af:component definition based on the attribute.
    <ViewAttribute
    Name="Cod"
    IsPersistent="false"
    PrecisionRule="true"
    Precision="15"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    AliasName="COD"
    Expression="COD"
    SQLType="VARCHAR"
    IsUpdateable="while_insert"
    LOVName="LOV_Cod">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="15"/>
    </DesignTime>
    <Properties>
    <SchemaBasedProperties>
    <CONTROLTYPE
    Value="input_text_lov"/>
    </SchemaBasedProperties>
    </Properties>
    </ViewAttribute>
    <af:inputListOfValues id="ilov1"
    popupTitle="Search and Select: #{bindings.BLOCK.hints.Cod.label}"
    value="#{row.bindings.Cod.inputValue}"
    model="#{row.bindings.Cod.listOfValuesModel}"
    required="#{bindings.BLOCK.hints.Cod.mandatory}"
    columns="#{bindings.BLOCK.hints.Cod.displayWidth}"
    shortDesc="#{bindings.BLOCK.hints.Cod.tooltip}"
    autoSubmit="true">
    <f:validator binding="#{row.bindings.Cod.validator}"/>
    </af:inputListOfValues>

    Helga,
    The question is what does this "require" flag do? We read the book of life (cl_htmlb_inputfield), and see that this flag only controls in the first instance a little red * that is rendered next to the input field. This is a pure visualization for the user of the page.
    In addition you can ask that a check be done in the browser. This you can do with:
      <htmlb:inputField  id = "wander"
                         value = "E"
                         required = "TRUE"
                         doValidate="true" />
    However, I would not serious recommend this. Now even if you user presses a cancel button, or link, or breadcrumb, or..., the check will still complain.
    What we currectly do (and recommend), is to set the required flag on the <htmlb:<b>label</b>/> tag. And then do the actual checking on the server (must be done in anycase). If no value, or not correct, then also set the "invalid" flag, render out error message and redo page.
    ++bcm

  • Update Managed Metadata field in SharePoint 2013 Designer Workflow for O365

    Hi Guys,
    I need to update the managed metadata field in SharePoint Custom List using Workflow but its not working. I have also tried to use the HTTP WebService POST Operation but no luck.
    Am doing this for a SharePoint Online (O365) Site.
    Has anyone worked on something similar and was able to get it running ?
    I saw a post to create a custom Workflow Activity but I don't have a choice to go with the custom code option.
    http://patrickboom.wordpress.com/2013/07/23/workflow-activity-set-managed-metadata-column/
    I was able to achieve this by creating a SP 2010 based Workflow for O365. Which means that it worked well with SP 2010.
    Is there a different way to do it in 2013 ? I tried almost all options apart from creating custom Activity but nothing worked out. 
    Any help would be great.
    Thanks,
    Nutan
    Nutan Sharma

    Hi Nutan,
    According to your description, my understanding is that you want to update Managed Metadata field with SharePoint 2013 Designer for SharePoint Online.
    As far as I know, there is not an OOB action to achieve your requirement with SharePoint 2013 Designer for SharePoint 2013. Customizing a workflow action is a better option to achieve it.  Why didn’t you customize a workflow action as Patrick’s blog?
    In addition, please take a look at the article about Nintex workflow, check whether it is useful for you:
    http://habaneroconsulting.com/insights/setting-managed-metadata-fields-in-a-nintex-workflow#.UykBSf6KDHo
    As this issue is about SharePoint Online, I suggest you create a new thread on SharePoint Online forum:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=onlineservicessharepoint . More experts will assist you.
    I hope this helps.
    Thanks,
    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

  • Icon for Property Metadata

    Hello everyone,
    I want to assign an icon to every Property Metadata that i define.
    When you create a new property, you can enter property metadata values in csv format. Is it possible to associate an Icon  as well with the MetaData Property ?
    Its possible to enter MIME types as well in csv format. I am trying to use it but the tab is not displayed if I use any property renderer related to image. If I set "property renderer" to "Not set" then I can see my MetaData values but no Icons / Images.
    I believe, diplaying images as property metadata should be possible. Has anyone tried it? I am not using the correct combination of property and property renderer I guess.
    Help me out in this case ..
    Cheers!!
    Ashutosh

    Hi Ashutosh,
    Form my understanding of the <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/1a/9a4a3b80f2ec40aa7456bc87a94259/content.htm">OnlineHelp</a>, I do not see how to do what you want without programming.
    The MIME types we can enter in CSV format, refer to a list of document types to property apply.
    As the allowed values are "text", I do not expect it is possible to associate images to these texts.
    Sorry not to have better news
    Vincent

  • Get a list of all available Property MetaData through API

    Hello,
    We have create some custom Property MetaData and assigned them to an new group.
    Now I need to be able to get a list of all the Property MetaData in this new group using a SAP portal API.
    But the only code snippets I've found requires at least the name if the property metadata.
    In other cases a KM IResource object is needed but then you only have the property metadata that's applicable on that IResource.
    Is it possible to do what I have in mind?
    If so can you point me into the correct direction, or provide a code example.
    I've been looking at the IMetaModel, IMetaGroupListIterator, IMetaGroup etc but I've not found any solution.
    Thanks a lot!
    Kind regards,
    Dries

    Hi
    Try this:     
      IConfigurationAccess icAccess = Configuration.getInstance();
      IWDClientUser wdcu = WDClientUser.getCurrentUser();
       com.sap.security.api.IUser sapUser = wdcu.getSAPUser();
      IUser user = WPUMFactory.getUserFactory().getEP5User(sapUser);
      IConfigClientContext confContext = IConfigClientContext.createContext(user);
    IConfigManager icManager = icAccess.getConfigManager(confContext);
      IConfigPlugin icPlugin = icManager.getConfigPlugin(ConfigurationProxy.CFG_PLUGIN_CM_SERVICES_PROPERTIES_METADATA);
    IMutableConfigurable[] mcs = icPlugin.getConfigurables();
    this mcs object will give you list of all meta data property for this user.
    Hope this helps
    Regards
    Puneet

  • Disconnect WSUS server and Process of Approving Updates via Metadata.

    Hi Folks:
    I have recently setup 2 WSUS servers.   The first one has connectivity to the Internet and of course has access to Microsoft updates.   The second WSUS server is part of a disconnected network.   Both WSUS servers are supporting client workstations
    of various operating system versions.   The connected WSUS server is fairly easy, from a management viewpoint.   I simply check to see what updates are "Needed" and I approve them for download.   However, the disconnected WSUS server
    is the one that I need some advice on.   I want to have a fairly simply procedure for the disconnected WSUS server, but here is the procedure that I think would work:
    Transfer metadata and updates via disc from the connected WSUS server to the disconnected WSUS server (using documented export/import procedure).
    Check to see what is "Needed" updates on the disconnected WSUS server, once the WSUS server has had a chance to absorb all the imported metadata and updates.   This means that the disconnected WSUS server has determined from it's supported
    client workstations, what updates are required.
    Generate a list of those "Needed" updates in some form, so that I can now approve those updates on the CONNECTED WSUS server for download.  
    Once those updates have been downloaded to the connected WSUS server, transfer the updates and metadata again to the disconnected WSUS server.   Approve those updates, so that they can now be sent out to the client workstations on the disconnected
    network.
    If that is my procedure (can someone like Lawrence Garvin), please let me know, if that sounds correct.   I'm concerned about the double export/import of the metadata and updates.
    Also, I'm wondering if it would be better to have separate connected WSUS server for supporting the disconnected WSUS to keep things straight.
    For example:
    One connected WSUS servers supporting the set of client workstations, that are on the connect WSUS server's network.
    One disconnected WSUS server supporting the set of client workstations that are on the disconnected WSUS server's network.
    One more connected WSUS server, that would be used to download and transfer metadata and updates to the disconnect WSUS server.   The advantage in keeping this separate, is that you would never confuse approved updates between the connected network
    client workstations and the disconnected network client workstations.  Especially, if they have different versions of software, that require updating.  
    Any input would be appreciated.

    You will likely also want to configure your WSUS server to "Download express installation files." under the "Update Files and Languages," setting on your options.
    I will unequivocally disagree with this statement, for several reasons:
    First, there's nothing that needs to be deployed that would use Express Installation Files anyway. Express Installation Files were designed to facilitate the deployment of Very Large Updates (read: SERVICE PACKS) across slow-speed links by significantly
    reducing the size of the binary that must be downloaded by the CLIENT. There are NO service packs in the catalog that won't already be installed on any client system.
    Second, in exchange for that ability of clients to download less, it significantly increased the size of the binary that must be downloaded by the SERVER from Microsoft. Express Installation Files will cause hundreds of gigabytes of extra binaries to be
    downloaded, which will need to be transferred to the disconnected server. None of which will actually ever be used.
    Third, most disconnected networks do not include WAN links, so the primary purpose of Express Installation File is contra-indicated by the very scenario being discussed.
    Otherwise by default you might get just an installer downloaded onto the WSUS server and clients might still need internet access to download the actual package contents.
    It would seem that you do not correctly understand Express Installation Files.
    There is an in-depth explanation of Express Installation Files in the WSUS Deployment Guide. For additional information see
    https://technet.microsoft.com/en-us/library/dd939908(v=ws.10).aspx#express
    I also would not recommend a internet facing WSUS server just to provide updates to the disconnected WSUS server as that will also need to download a full copy of the content to that server when it is likely already downloaded onto your internet
    / production WSUS server anyway.
    Seemingly you are also not actually familiar with the documented guidance for how to manage disconnected networks. An Internet-facing (connected) WSUS server is *exactly* how this is done.
    You may also find this part of the Deployment Guide to be useful reading:
    Configure a Disconnected Network to Receive Updates
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • Replace property metadata values with icons

    Hello everybody,
       We have created a new property metadata with specific allowed values. Then we created a new layout set to list a repository including that metadata. We are wondering if there is a way to replace the specific metadata values in the list with a set of icons to improve the look and feel.
       Best regards,
           Virgilio Ruiz

    Hi Virgilio
    Here a description how to use one of the standard property renderers that touches your needs:
    https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3648
    If it does not cover your needs, you should go for development as suggested by Robert.
    Kind regards,
    Martin Søgaard

  • Exporting Property Metadata

    Hi,
    does anybody know how to export and import property metadata from one system to another?
    I have created some properties through System Configuration>Content Management>Global Services>Property Metadata>Properties. Now I want to export this properties and import them to the test system.
    Thanks in advance.

    Hi Gregori,
    if you are on NW04, go to the place you described by your own, choose Actions -> Export -> Start from the top menu, mark the properties you whish to export, choose Export, choose settings, choose OK; you can add other configurations as well into the same export, like new namespaces...
    After done, choose Actions - Export - Finalize, fill in an Archive Name, choose OK.
    Now you can download the configArchive.
    You can import it via Actions - Import.
    Hope it helps
    Detlev

  • Rename property metadata and keep values

    Hello,
    I tried to rename a property metadata by changing the property id.
    Then I saw that the values of the changed property will not be shown. Is there a way to keep the values and to change the property id?
    Regards
    Marco

    Hi,
    i've created a WebDynpro that makes the changes at table UME_STRINGS. You only have to change the ATTR- and ATTRH-values.
    I hope this table will not be changed by SAP at next time.
    Regards
    Marco

  • Adding Property MetaData to Upload screen

    Hi,
    I would like to add some Property Metadata for documents that I upload to the KM.
    I have managed to created a new tab with all my properties, but I would like to have some of these properties on the first screen of the upload process, meening, near the name & description of the file - and not inside a different tab.
    Any suggestions how to add properties near the name and description of the file.
    Thanks in advance,
    Aviad

    Hi Avaid and Kiran,
    <b>Creation of Property Metadata:</b>
    navigate to: System Administration -> System Configuration -> Knowledge Management -> Content Management -> Global Services -> Property Metadata.
    This would give you all the properties that are linked with content management.
    When you check Details of any document, the properties (modified date, created date, etc) all exist in the above mentioned Property Metadata.
    If exists, you can use the property.
    Read more:
    http://help.sap.com/saphelp_nw04/helpdata/en/75/e000861cb8ad4b8e4f19dd6416346d/frameset.htm
    Assuming that it does exist then how should you add this property such that its visible/accessing in Document details:
    Navigate to => System Administration -> System Configuration -> Knowledge Management -> Content Management -> Global Services -> Property Structures.
    The tabs that you see in Document details are all placed in tabs.
    If you want your property to be placed in a different one, then create your tab, add your property and add this tab in the all_groups tab.
    The link given above contains all details.
    Please check these documents:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/how to configure predefined properties with dependent values.pdf
    and https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/working with metadata properties in km.pdf
    All the best!
    Warm Regards,
    Ritu R Hunjan

Maybe you are looking for

  • How to backup both my MacBook air files and Windows 7 files via Parallels?

    Hi, I'm new to apple support........I need to purchase an external drive to backup my files from my MacBook air but I also need to backup two main programs that i use for my business on Win7 via Parallels. Can I use the same drive and/or time machine

  • Sd delivery date and ship to party

    HI ALL..................     PLS TELL ME IN WHICH TABLE I CAN GET "DELIVERY DATE"  AND "SHIP TO PARTY"  AND BUDAT  FIELDS...... Moderator Message: Basic Question. All Caps => Thread Locked Edited by: kishan P on Nov 25, 2010 1:47 PM

  • HELP!!! APERTURE WILL NOT OPEN!!!

    Regardless of how I try to open the app it will not open! I have already serialized the product yet, it continously asks for a serial number. Once re-serialized it takes me to the welcome screen. Regardless of the method used or option selected I get

  • I need some serious help...

    Okay, so, I was playing RuneScape earlier today, for you who don't know, it's a browser game, and I started lagging, really bad. All of a sudden, my computer went to the blue screen, and it told me just to restart my laptop. So I did, and when it sta

  • HP Support Assistant not functioning.

    I have a Touchsmart 600-1050, Windows 7 (64-bit), upgraded to version 4. The HP Support Assistant is not working. My system doesn't show on it when I open it up. I've gone to HP's website to download the latest update and it will go through the norma