BPM, Workflow, and Case

 View Only
  • 1.  BAW. How upload file to ECM (filenet) with two custom properties?

    Posted Wed February 08, 2023 09:28 AM
    I am new in BAW. I try upload file to ECM (Filenet) and save 3 custom properties. I put on coach controls:
    1. ECM File Uploader
    2. 2 x Text Field (digType, digDesc)
    I can upload file but I don't know how save its properties.ECM File Uploader don't retrun any ID of uploaded file.
    Can anyone tell me exactly how to do it?

    ------------------------------
    Witold Olewniczak
    ------------------------------


  • 2.  RE: BAW. How upload file to ECM (filenet) with two custom properties?

    Posted Thu February 09, 2023 12:55 AM
    Edited by Witold Olewniczak Thu February 09, 2023 12:58 AM

    I resoved my isue myself. I did script in onClick event of "Save" button.

    function psgGenFileName(){
        var myDate = new Date();
        myName = myDate.getTime();
        
        var filename = ${txtFileName}.getText();
        
        if( filename != ''){
            myName = filename;
        }
        
        ${ECM_File_Uploader1}.setDocumentName(""+myName);
    }

    function psgPrepProps(){
        var props = [];    
        props[0] = 'digPlikRodzaj';
        props[1] = 'digPlikOpis';
        
        var values = [];
        values[0] = ${digPlikRodzaj}.getData();
        values[1] = ${digPlikOpis}.getText();
        
        ${ECM_File_Uploader1}.setUploadProperties(props, values);
    }

    psgPrepProps();
    psgGenFileName();

    ${ECM_File_Uploader1}.startUpload();



    ------------------------------
    Witold Olewniczak
    ------------------------------



  • 3.  RE: BAW. How upload file to ECM (filenet) with two custom properties?

    Posted 6 days ago

    Hello

    We have been trying to use the uploader, it works well but we are facing issue while setting multi-value property. For example, we are using the below snippet for setting the value

    var props = [];    
        props[0] = 'multiValuePropertyName';
        
        var values = [];
        values[0] = ["value1","value2","value3","value4"];

    Below is the error

    E_BAD_VALUE: The value given for a property or list element lies outside the permitted range or value set, or exceeds the maximum length allowed. The value ([object Object]) specified for property "MultiValue Property Name" is not within the range of permitted values

    I believe it is expecting string value instead of string array.

    Is it so that multivalue properties cannot be set using ECM File Uploader or something needs to be changed ?

    Thanks



    ------------------------------
    Lakshya Agarwal
    ------------------------------



  • 4.  RE: BAW. How upload file to ECM (filenet) with two custom properties?

    Posted yesterday

    There is a weird way you have to specify the multivalue case properties using braces and single quotes. Here is how they have it in the documentation.

    propertyNames[2] = "S1_Shippers";
    propertyValues[2] = "{'ABC Logistic','XYZ Freight'}" // Multiple values

    You can look at the documentation here: https://www.ibm.com/docs/en/baw/24.x?topic=examples-interacting-cases-activities



    ------------------------------
    Julie Garza
    ------------------------------