# Document Management apps

The team at IEG4 have always had the ability to link online forms to back office EDMS apps. But this required this to be done adhoc through the database.&#x20;

We've added the capability in eDesigner that you can create integration to your back office EDMS without code yourselves. This means you can build a form for any purpose i.e. for housing, council tax, benefits, trees, licensing, anything, and be able to:

a) save the PDF from the form to a file location

b) rename the PDF based upon data in the form or the IEG4 form reference

c) save a CSV related to the form which contains data that enables automated indexing, placing into the appropriate queue etc.&#x20;



{% hint style="success" %}
This has been proven to work with:

* Civica DM360&#x20;
* Civica Comino
* Northgate Information@Work
* Northgate ICLipse
* OpenText EDMS
* IDOX EDMS
{% endhint %}



This is all controlled within a single new action called:

**SaveDocumentAndControlCsv**



### **Creating an action**

To add an action you need to click on the 'Actions' link found here in Form Details:

![Where to add actions that will be fired when the form is submitted](https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2FEwiFblbRANgK0JK1JQAe%2Fimage.png?alt=media\&token=4ff1c25c-08f4-4c31-8f97-5d64d92f8a84)

{% hint style="info" %}
**Note**&#x20;

Because an action can be different from one environment to another, you need to do this for EACH environment.
{% endhint %}

Within there click Advanced Create and select the option :

![Save Document and Control CSV](https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2Fh2KZuzPhzrMhtXp04rDg%2Fimage.png?alt=media\&token=545e59a3-2ec7-4a63-8d92-13e1473e1318)

\
There is a lot of control provided by this action and this means there are a lot of settings/options. We will walk through the ones you'll use and how to use them.



### **High Level fields**

The following are the first set of fields:

![](https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2FOFDtgSxgWbdBtl5cuEAo%2FScreenshot%202021-12-10%20at%2010.16.41.png?alt=media\&token=91b9f497-bf29-464f-a821-16d29da9fa30)

The fields above are described below:

**Name**&#x20;

{% hint style="danger" %}
Don't change this, as it what tells the form, which action to trigger.
{% endhint %}

**Description**

The Description is what will be shown in the Forms Portal when you look in the Documents tab.

&#x20;

**Folder**

This is the network location that the file should be saved to.&#x20;

{% hint style="warning" %}
IMPORTANT - When a form is submitted it needs to arrive on your network securely. To do this your IT will have installed a service to ensure it is secure.  This is called the Integration Proxy Service.&#x20;
{% endhint %}

_Why is this relevant?_&#x20;

1\) This service needs to have access to the file location you specify. Or you will see this when you look in the Portal:

Access to the path '\\\server\Imports\Test' is denied.&#x20;

2\) In a section later you need to get the information needed to make the action communicate via this secure mechanism - see _Integration Proxy Settings_.&#x20;



**Document Type**

This will always be FORMPDF&#x20;

&#x20;

**Extension**

This will nearly always be:

**.csv**

But we do know some councils have tns.&#x20;

This is to specify the file format of the control file. See 'What is a control file' later.&#x20;



### **Setting the filename format**

&#x20;By defaul&#x74;**,** the filename of PDFs output from our online forms are like this:

QDDDTCMZ - Form.pdf

&#x20;I.e. Form Reference - Form.pdf

However, for some EDMS applications the file is imported based upon the file name.&#x20;

Therefore the following settings enable you to change the file name format. I.e. it is possible to have 5 elements in the filename.

E.g

CouncilTaxAccountNumber-IEG4FormReference-CTAXREF.pdf

So if the account number provided was 987654321 and the form reference was FHDSASUD, the filename would be:

987654321-FHDSASUD-CTAXREF.pdf

The options available to use for the filename are:

| Option Name   | Examples of how you could configure it                 | Explanatory notes                                                                                                                                                                                                                                                                                                                               |
| ------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| static        | <p>static,CTAXREF</p><p>static,RB</p><p>static,HOU</p> | <p>This should be used wherever you want a value to be present that won't change. </p><p>This type can be added to multiple columns I.e. you might have a file like the earlier example which has this:</p><p>987654321-FHDSASUD-CTAXREF-RB.pdf</p><p>With the 4th column of the file name being the queue the work should be pushed into. </p> |
| formreference |  formreference                                         | This means the IEG4 form reference will be included                                                                                                                                                                                                                                                                                             |
| xpath         | xpath,//page\[@id='whoareyou']/CTRef,UNKNOWN           | This setting allows you to map data from your form into the filename. See '[**What is an XPath**](#what-is-an-xpath)' below.                                                                                                                                                                                                                    |
| datesubmitted | datesubmitted                                          |  This will show the date the form was submitted                                                                                                                                                                                                                                                                                                 |
| sourceid      | sourceid                                               | This enables details of whether the form was completed inside or outside of OneVu to the filename.                                                                                                                                                                                                                                              |



### **What is an XPath?**

An XPath is a technical term ([**details can be found here**](https://www.w3schools.com/xml/xpath_intro.asp)) but the simplest way to understand it, is that it allows you to specify the location of a specific answer to a question in a form you've built.&#x20;

This is really powerful, as it means any field in a form can be used in the filename or the control file output to maximise the level of automation you have. So let's look at an example:

xpath,//page\[@id='whoareyou']/NationalInsuranceNumber,UNKNOWN

Three elements of this have been added to the standard format. These relate to:

* The page the question is on
* The specific question's id on the page to get the data from
* What to add if this is empty not provided

So for the above example this question is here and we can see the page id is the page the question is on - as shown in the URL:

![](https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2FZ9uKX4YOsVBNqlACEgWn%2Fimage.png?alt=media\&token=5cba2942-b352-4769-ac53-1b3d3b9c97f0)

If you go into designer mode and click to 'Edit' the question you will get its 'Field id'. We can see below the Field id for the Council tax account number is NationalInsuranceNumber and why it is structured like the above.

![](https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2F2FrWzzi5COEsIvXIynRD%2Fimage.png?alt=media\&token=c7cde194-525f-4448-955b-5c9e165ceb4d)

So basically you just need to get the page name from the url and the field id and copy and paste them into place.&#x20;

For info - if the file format was instead like this:

xpath,//page\[@id='**whoareyou**']/NationalInsuranceNumber

If no value is provided to the answer instead of putting UNKNOWN in the filename/control file it will place the IEG4 form reference. &#x20;



### **Powerful XPaths**

The reason this is really powerful is that XPaths can be added to multiple columns. Let's say you've built a form and it asks for licence reference. And it also asks for licence type in a drop down list. You can add both of these in the filename/control file to ensure it is automatically indexed the way it is desired in the EDMS. This will work for both drop down and radio item lists  - not checkbox lists where multiple items could be selected. The format for the xpath setting where it is a list is slightly different. &#x20;

logicalxpath,//page\[@id='**start**']/**LicenceType**/item\[@selected='True']/@value,equal,1,**UNKNOWN**

So in this case we have the same three fields page, question (field id) and what to do if not provided - UNKNOWN.

So going back to our licensing analogy. Let's say I want my filename to be:

LicenceId-LicenceType.pdf

I would add something like this to column 1 and 2 of the filename settings:

Filename Column 1     xpath,//page\[@id='start']/**LicenceRefNo**

Filename Column 2    logicalxpath,//page\[@id='**start**']/**LicenceType**/item\[@selected='True']/@value,equal,1,**UNKNOWN**



### **What's a control file?**

A control file can be created along with every PDF to tell the EDMS what to do with it. E.g. you could have an online form PDF called FHDSASUD.pdf. I.e. the name of the file is an IEG4 form reference and this would mean nothing to your EDMS.

A separate control file could contain this within its csv file format:

FHDSASUD.pdf,987654321,CTAXMOVE

Where the first column is the form that should be imported, the second says the council tax account number and the third is the document code/type that the form should be indexed with.

&#x20;There are specific settings for the content of the control file as shown below. Note there are actually up to 20 columns available. We've only shown 5 to reflect the maximum of what most sites d&#x6F;**:**

![CSV Mapping fields](https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2FMZdMVn76oAAbwN8eCqHc%2FScreenshot%202021-12-10%20at%2010.29.35.png?alt=media\&token=40e34998-99c3-4989-a72a-a42d045ad4d4)

The example above will create a control file with the following content:

LicenceCaseNumber,TEST,Licensing,TAXINEW,Filename.pdf

So if the filename was 987654321.pdf and Licensing Case number was also 987654321, the control CSV would be as follows:

987654321,TEST,Licensing,TAXINEW,987654321.pdf

&#x20;The options available are the same as for filename with exception that the filename option is also available:

| Option Name   | Examples of how you could configure it                 | Explanatory notes                                                                                                                                                                                                                                                                                                                      |
| ------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filename      | filename                                               | This will ensure the filename as configured within the earlier settings will be present.                                                                                                                                                                                                                                               |
| static        | <p>static,CTAXREF</p><p>static,RB</p><p>static,HOU</p> | <p>This should be used wherever you want a value to be present that won't change. </p><p>This type can be added to multiple columns I.e. you might have a file like the earlier example which has this:</p><p>987654321,FHDSASUD, CTAXREF,RB</p><p>With the 4th column of the CSV being the queue the work should be pushed into. </p> |
| formreference |  formreference                                         | This means the IEG4 form reference will be included                                                                                                                                                                                                                                                                                    |
| xpath         | xpath,//page\[@id='whoareyou']/CTRef,UNKNOWN           | This setting allows you to map data from your form into the CSV. See 'What is an XPath' above.                                                                                                                                                                                                                                         |
| datesubmitted | datesubmitted                                          |  This will show the date the form was submitted                                                                                                                                                                                                                                                                                        |
| sourceid      | sourceid                                               | This enables details of whether the form was completed inside or outside of OneVu to the CSV.                                                                                                                                                                                                                                          |

&#x20;

### **Components to Concatenate**

This should be set to 0.&#x20;

&#x20;

### **Integration Proxy Settings**

In order to save documents on your network securely they are passed through the integration proxy service.

First ensure Use Proxy is set to **true**.&#x20;

This service will have been installed by your IT team and the config file for this service contains three pieces of information you'll need. The config file is called:&#x20;

IEG4.eGovHub.IntegrationProxy.Hosts.Windows.exe.config

The three bits of information needed are:

\<add key="ServiceNamespace" value="This value" />    &#x20;

\<add key="IssuerName" value="This value" />

\<add key="IssuerSecret" value="This value" />    &#x20;

Alternatively you can ask IEG4 support for these using:

{% embed url="https://help.ieg4.com" %}
These values go here in the action set up:
{% endembed %}

These values go here:

![Proxy settings](https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2FX6Qmrbxx7VduPlLqRN0h%2FScreenshot%202021-12-10%20at%2010.32.20.png?alt=media\&token=ed50d935-6d27-452c-b793-c52449ffe966)

### **Source ID Settings**

As mentioned earlier, it is possible to pass whether the form was submitted from OneVu or not in the filename/CSV.

![](https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2FspYHmZRQbghIBTyx7wYS%2FScreenshot%202021-12-10%20at%2010.36.42.png?alt=media\&token=e78e8d59-00ae-4b36-96b7-77380340c47b)

**Example**

In the following example the filename is set up to be mapped to the account number. In a form the user enters their account number as 70129302.

In the Forms Portal the action has this:

File saved to \\\server\Imports\Test\70129302.pdf. ||||

File saved to \\\server\Imports\Test\70129302.csv

The CSV content is these four columns separated by a comma:

| **70129302.pdf** | 70129302 | CTAXREF | 21/02/2020 |
| ---------------- | -------- | ------- | ---------- |

I.e.

70129302.pdf,70129302,CTAXREF,21/02/2020,

This is because we set the four columns to be:

* filename
* xpath,//page\[@id='whoareyou']/CTRef,UNKNOWN
* static,CTAXREF
* datesubmitted

No code integration to your EDMS e.g. [Information@Work](mailto:Information@Work) - done!\
