Table of contents
Overview
This article presents the method to import Web forms associated to incident templates and service request types.
When importing Web forms, it is important to understand that each field depends on the one right before in the form. In case of a problem with a field, this field and the ones coming after will be rejected.
Example: If in a form, the field in position 3 causes an error, all subsequent fields will be rejected.
References
- Import Incident Templates and SR Types
- XML Configuration File
- Back to main page for DataImporter
- Backto the Import Source Specification list
The reference template files (.xlsx et .xml) to prepare imports are included in the IncidentTemplate.zip file.
Required Fields
- IncidentType
- Determines if it is an incident or a service request (SR)
- Accepted values are : Incident or SR
- TemplateDescription - Text (500)
- Represents the name (DescriptionFR or DescriptionEN) of the incident template or SR type that will be associated to the field. It is important to refer to the description in the same language as the one used by default in your database
- The combination of the fields; Folder, TemplateDescription and Position must be unique
- The incident template or SR type must already exist, otherwise the record will be rejected
- Position - Whole number
- Indicates the position of the field in the Web form
- The fields must be presented in order in the file, from number 1 and so on, without omission or repetition
For more information, refer to the Managing the behaviour when adding to existing forms article.
- LabelFR - Text (50)
- French name of the field, visible on the Web
- LabelEN - Text (50)
- English name of the field, visible on the Web
- IsRequired - Boolean
- Indicates if the field will be required when filling the Web form
- Accepted values are: 1 or 0, True or False, Yes or No
- Type
- Indicates the type of field that will be used
- Accepted values are; Check box, CI, Combo box, Date, File attachment, Header, Large text, Text
- For more information on types, see the Web form - customization article.
Optional Fields
- Folder - Text (100)
- Represents the structure where to find the incident templates or SR types
- If the incident template or SR type is found at the root, leave this field empty
- When there is a folder with sub-folders, you need to separate them with a backslash "\"
- Source - Text
- Required of the type is Radio buttons or Combo box
- Indicates the name of the Value list to be used
- The Value list must already exist, but it can be empty
- DisplayCondition - Text
- Indicates the variable of the condition to make the field appear
- Destination - Boolean
- Required if the type is Data and Time
- Accepted values are: Date d'ouverture ou Date d'échéance, Open date ou Due Date
- InstructionsFR - Text (8000)
- Can contain additional instructions in French to give details on the field
- Even if the field InstructionsEN is used, the field InstructionsFR does not need to be. Then there will be no instructions in French on the Web portal
- InstructionsEN - Text (8000)
- Can contain additional instructions in English to give details on the field
- DefaultValueFR - Text (5000)
- This field allows to put a default value in French in a Text, Long text or Combo box type field
- If this field is used, the Web form will already contain the inputted value when being filled out
- DefaultValueEN - Text (5000)
- This field allows to put a default value in English in a Text, Long text or Combo box type field
- If this field is used, the Web form will already contain the inputted value when being filled out
Configuration File (XML)
The declaration of the source is done by indicating the field value in the <Content> tag.
<?xml version="1.0" encoding="utf-8" ?> <Sources> <Source Name="ImportFields"> <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\Import\IncidentTemplate.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";</ConnectionString> <ViewName>[Import Fields$]</ViewName> <Content>Field</Content> <ReplaceAllExistingFields>False</ReplaceAllExistingFields> </Source> </Sources>
Information on Additional Tags
To import incident templates and SR types, the XML file can contain 1 additional tag. This tag is not mandatory and if it's not specified, the default value will be used.
Managing the Behaviour When Adding to Existing Forms
In the XML file to import Web forms for incident templates and service request type, it is possible to specify how the import will behave.
Permitted values for the ReplaceAllExistingFields tag:
- False (Default value): The program will import the custom fields in the specified position
- True: The program will erase all custom fields before running the import as specified
To use this tag, add the following line to the XML file:
<ReplaceAllExistingFields>valeur</ReplaceAllExistingFields>
Thank you, your message has been sent.