• Does unchecking required have

    Does unchecking required have any affect? Just curious.

  • Attach PDF Files to submitted form

    We have PDF documentation that we would like to be attached to the form when it is submitted. Trying to figure out how we can accomplish this. When the form is filled out and submitted, it starts a worfklow process, that form and any attachments the users attaches via the upload link gets sent to the user in the workflow. Was wondering if it is possible to attach certain PDF if they choose a certain radio button in the form? Possibly workflow? not sure how this could be accompllished or if it could be..

     

    Thanks in Advance

     

    cm

  • Phil, does this also go for

    Phil, does this also go for DW7? or does it use Platform out of box install for desktop apps import?

  • Josef, I tested this and it

    Josef, I tested this and it does use the validation that you have for that store dialog.

    https://www.docuware.com/sites/default/files/forums-images/validation_test_form.png

  • I posted something on this a

    I posted something on this a couple months ago. Still haven't gotten an answer from anyone at docuware. I am thinking maybe I will just create a service ticket and ask the question... 

  • Steve, i am not a coder

    Steve, i am not a coder either. It all comes precoded just need to adjust the DB field names with what yours are called. This basically validates on the store of the document whether its a duplicate or not. Just to let you know, I have it working with Workflow manager as well, but I ran into a problem. When the AP clerks store the document, they don't know if its a duplicate right away. We have an invoice approval process that starts right on the storage of the document. So, if it is a duplicate, the workflow would still kickoff for the approval process. It just wasn't working for us. We would then need to delete the duplicate, go in and stop the workflows for approval . By doing the validation before storage this would allow the notification of duplicate before it is even stored.

     

    Whether this works on 6.6 not sure. I was using on v7.

  • Hey Steve, check this forum

    Hey Steve, check this forum out. I just installed nodejs and copied the files from github and this works perfect. Doesn't take long at all to get setup.

    https://www.docuware.com/forum/english-forums/docuware-questions-about-u...

     

  • UPDATE: So I was missing the

    UPDATE: So I was missing the exports.checkValues function. Once this was added everything worked great. Below is what the validation before storing file looks like: (Mind you, all this does is validate that an invoice with doc type of Invoice, Invoice Number, and Vendor Number arent already in the cabinet being stored into. If there is a match, it notifies and won't let then store. Works great for not even allowing duplicate invoices in the system)

    const DWparameters = require('./DWValidationSettings');
    const validator = require('validator');    
    const unirest = require('unirest');

     

    exports.checkValues = function (DWInputValues) {
        var invoiceNo = this.getFieldValue(DWInputValues.Values, DWparameters.fieldNameDOCNUMBER);
        var supplierID = this.getFieldValue(DWInputValues.Values, DWparameters.fieldNameSUPPLIER);    

        return new Promise((resolve, reject) => {
            this.isDuplicateInvoice(DWInputValues.FileCabinetGuid, invoiceNo, supplierID)
             .then(success => {
                if (!success) {
                    throw new Error('There is already an invoice stored (#'+ invoiceNo +'SupplierID:' + supplierID + ')');
                }

                return success;
            })
        .then(success => resolve(true))
                                    .catch(function (error){
                                                    reject(error);
                                    })    
        });
    }

    exports.getFieldValue = function (DWIndexFieldCollection, fieldName) {
        var field = DWIndexFieldCollection.find(x => x.FieldName == fieldName);
        if (field === undefined) {
            return;
        }

        return field.Item;
    }

    exports.isDuplicateInvoice = function (fileCabinetGUID, invoiceNo, supplierID) {
        return new Promise((resolve, reject) => {    
            var CookieJar = unirest.jar(true);

            //logon to DW PLATFORM and retrieve cookie;
            unirest.post(DWparameters.DWPlatformUrl + '/Account/Logon')
            .headers({'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded'})
            .jar(CookieJar)
            .send({ 'UserName': DWparameters.DWPlatformUser, 'Password': DWparameters.DWPlatfromPassword, 'Organization': DWparameters.DWPlatformOrganization, 'RememberMe': false, 'RedirectToMyselfInCaseOfError': true })
            .end(function (response) {
                unirest.post(DWparameters.DWPlatformUrl + '/FileCabinets/'+ fileCabinetGUID +'/Query/DialogExpression?dialogId='+ DWparameters.DWSearchDialogGUIDForInvoiceSearch +'&format=table')
                .headers({'Accept': 'application/json', 'Content-Type': 'application/json'})
                .jar(CookieJar)
                .send({ 'Condition':[
                    { 'DBName':DWparameters.fieldNameDOCNUMBER, 'Value': [invoiceNo] },
                    { 'DBName':DWparameters.fieldNameSUPPLIER, 'Value': [supplierID, null] },  
                ],
                'SortOrder':[],'ForceRefresh':true,'FlagConditions':{'IncludeCheckedOut':false},'Operation':'And','AdditionalResultFields':[],'Start':0,'Count':1})
                .end(function (response) {
                    if (response.error) {
                        return reject(new Error(response.error.message));
                    }

                    try {
                        var resultCount = response.body.Count.Value;
                        return resolve(resultCount == 0);                
                    } catch (error) {
                        return reject(new Error("Unable to retrieve similar invoices. Error:" + error));
                    }
                });
            });
        })
    }

  • Anyone have any suggestion on

    Anyone have any suggestion on this? It seems like a node_module didnt get installed or something..

  • This was not a file that I

    This was not a file that I have touched so I am not sure why I am getting this error. It actually specifically states not to touch this file.