Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

Set the value for MultiValue property for commonPropertiesLayout EntryTemplates

  • 1.  Set the value for MultiValue property for commonPropertiesLayout EntryTemplates

    Posted Wed October 20, 2021 02:34 PM

    I am using ICN 3.0.7.I want to set the value for MultiValue property for commonPropertiesLayout EntryTemplate(Migrated EntryTemplatefromworkplace/Creating EntryTemplate without clicking on 'EditLayout' option).

    Please find below code snippet:

    lang.setObject("customEntryTemplateOpenAction", function(repository, items, callback, teamspace) {

    if(items.length==1){

    var item = items[0];

    repository.retrieveItem(null, lang.hitch(this,function(item){

    this.entryTemp=item;

    var acid = new AddContentItemDialog();

    acid.showUsingTemplateItem(repository, null, true, false, callback, teamspace, this.entryTemp); aspect.after(acid.addContentItemPropertiesPane, "onCompleteRendering", function(){

    if(query(".defaultSpan").length == 0){

    var acip=acid.addContentItemPropertiesPane;

    var commProps = acid.addContentItemPropertiesPane._commonProperties;

    //Not Working

    if(commProps._propertyEditors){

    var props = commProps._propertyEditors._fields;

    array.forEach(props, function(prop, i){

    var name = prop.name;

    if(name === 'strmApplicability'){

    var jsonArrVal=new Array(); jsonArrVal.push("test1"); jsonArrVal.push("test2"); prop.setValue(jsonArrVal);

    //commProps.setPropertyValue(name,jsonArrVal);}

    //Working

    else{

    var fields = commProps._view.properties;

    array.forEach(fields, function(prop, i){

    var name = prop.controller.id;

    if(name === 'strmApplicability'){

    var jsonArrVal=new Array(); jsonArrVal.push("test1"); jsonArrVal.push("test2"); commProps.setPropertyValue(name,jsonArrVal);

    }

    }

    Can you suggest me how to set Value for MultiValued Property for CommonPropertiesLayoutEntryTemplate/Without using 'EditLayout' option'?



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: Set the value for MultiValue property for commonPropertiesLayout EntryTemplates

    Posted Wed October 20, 2021 05:01 PM

    Your query is a bit unclear.

    Are you trying to set a pre-set a value (default value) on the Multi-valued property (MVP) used in the ET?

    What is the reason you do not want to click Edit Layout ?

    What is the reason you do not want to define the layout on the ET and set a value there?

    What is commonProperties?



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: Set the value for MultiValue property for commonPropertiesLayout EntryTemplates

    Posted Thu October 21, 2021 04:08 AM
    • Yes, On opening the EntryTemplate I want to set the value for MultiValued property.The same thing i need to do for on click of Add Button but the above code is only for On Load for the moment.
    • EditLayout is used to edit the EntryTemplates-LayoutPropertiesPane(ecm.wdiget.LayoutPropertiesPane)(e.g. to make any property readOnly/Hidden/set default value).If we creating ICN EntryTemplates then there may be the case we will Edit it.
    • Setting the value to any property is dynamic(we are reading from XML).Defining/setting at ET level is static i.e. we know what value we need to set for that property which is not the case in our scenario as the property & its value are coming from XML.
    • commonPropertiesLayout is a layout type(ecm.widget.commonPropertiesLayout) which is there for migrated/Non-Edited Entry Templates.We have ~ 300 EntryTemplates migrated from Workplace5.1 to ICN (i.e. CommonPropertiesLayout)



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 4.  RE: Set the value for MultiValue property for commonPropertiesLayout EntryTemplates

    Posted Thu October 21, 2021 04:53 PM

    Thank you for your responses. We will review and update.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 5.  RE: Set the value for MultiValue property for commonPropertiesLayout EntryTemplates

    Posted Fri October 22, 2021 06:27 AM


  • 6.  RE: Set the value for MultiValue property for commonPropertiesLayout EntryTemplates

    Posted Wed November 03, 2021 03:34 PM

    Hello,

    Any help/suggestion would be appreciated.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration