BPM, Workflow, and Case

 View Only
Expand all | Collapse all

BAW. How upload file to ECM (filenet) with two custom properties?

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