Importing resources: configuration

 

The import contexts must be saved before triggering them.

 

Create an import context

 

A new import context is created via the Settings menu > Import/Export > Right-click on Resource import > Create a resource import context > Choose the dimension.

The corresponding part is then enabled:

import_ressource_contexte

Now enter the various characteristics, then click on:

  • OK to save the context,
  • Restore otherwise.

These characteristics are as follows:

 

Name

Give this import context a name.

If the multi-language management is activated in the Admin center, it will be possible to fill in a name for this import in the proposed languages by clicking on the v7_adm_en_parametres_generaux_symbole_multilangue button.

Note

Name of the importg in french Import du personnel
Name of the import in english Staff Import
What is seen in a FR desktop Import du personnel
What is seen in a EN desktop Staff Import

 

Description

Give a description of this context. This data is optional.

 

History

This represents the creation date and time and the most recent change to the context, together with the login of the user who implemented the actions.

This characteristic cannot be edited.

 

Definition

This is a definition of this context.

 

“URL” call

The activation of this option authorizes the triggering of this context using a URL from outside VISUAL PLANNING.

 

Return format

If the triggering of the context by URL is authorized, you can choose the message received when the URL is called in a browser.

There are two return formats:

  • Text: default format
  • HTML

 

HTML editor OK or KO

If the return format is HTML, you can edit the return message received by clicking on bouton-crayon.

The editing window is displayed in which you can personalize the message as appropriate:

import_ressource_editeur_html

Activating authentication

The activation of this option is used to protect the URL using Basic Access Authentication.

 

User ID

Define the identity (login) for the URL if authentication has been activated.

 

Password

Define the password for the URL if authentication has been activated.

 

Resource creation/modification

This button is used to activate the triggering of the context during the creation and/or modification of resources.

Caution

It cannot be activated for files on the disk or for an Access database.

Event creation/modification

This button is used to activate the triggering of the context during the creation and/or modification of events.

Caution

It cannot be activated for files on the disk or for an Access database.

Activated

This button is used to activate the import by service trigger.

 

Triggers

This option is used to define the triggers for an import by service.

 

Reporting activated

This button is used to send a report, by e-mail, of the results of each import trigger.

Warning

Prerequisites: The SMTP server must be configured as these are automatic e-mails. See Automatic sending of e-mail

Sender

Define the e-mail address to be used as the sender for the reporting by e-mail.

This parameter is only active and necessary when the Reporting activated checkbox is checked.

 

Recipients

Define the address(es) to be informed during the reporting by mail.

This parameter is only active and necessary when the Reporting activated checkbox is checked.

Definition of the import context

 

Source tab

import_ressource_source

The unique source of the import can be one of the following types:

  • CSV file,
  • Excel file,
  • Database,
  • Specific values.

Depending on the type chosen, the parameters required for the import are different.

Standard format

For *.CSV files

import_ressource_csv

Type

In this case, the value should be CSV file.

 

Separator

The separator in the source file can be:

  • Semicolon,

  • Full stop,

  • Space,

  • Comma,

  • Tab,

  • or Vertical Bar.

 

Encoding

The type of encoding is to be chosen to match the OS used on the server:

  • Default (System encoding),

  • UTF8,

  • Windows-1252 (Windows).

 

Path

Specify the access path, which may contain:

  • A CSV type file,

  • A URL-type address,

  • A standard text of the type Export=Export_Context_Name used to export imports.

Case with Excel files

_import_ressource_excel

You must define the following parameters:

 

Type

In this case, the value must be Excel file.

 

Path

Define the path to the file in *.XLS or *.XLSX format.

 

Worksheet

Define the worksheet of the source file to be imported.

Case with Database

 

If the import is from a database, you must choose the Database type.

import_ressource_database

You must define the following parameters:

 

Type

In this case, the value must be Database.

 

DBMS

Specify the DBMS technology used:

  • MSAccess,
  • MySQL,
  • Oracle,
  • SQL Server,
  • PostgreSQL,
  • or MariaDB.

Connection settings

Connection settings differ depending on the type of DBMS chosen. By clicking on Connection settings, a new window is displayed:

 

MS Access MySQL, SQLServer, PostgreSQL, MariaDB ORACLE
SID
Password
Path
Port
Server
Login
import_database_msaccess
import_database_sql
import_database_oracle

 

To validate these settings, click on:

  • OK,
  • or Cancel to go backwards.

Database

Define the name of the database to be used for the import.

 

Table

Choose the table or view to be imported.

This list is empty until the database has been identified.

 

SQL Condition

It is possible to define an SQL condition, notably to filter the data to be imported.

This condition is exclusively dependent on the structure of the external table used as a source.

It is not actually an SQL request, it an SQL Condition.

For request defined by SELECT * FROM TABLE WHERE CONDITION, simply remove the SELECT * FROM TABLE WHERE statement to retain only the CONDITION.

 

Professional meaning

Example of SQL request

Corresponding SQL Condition

All persons from Nantes

SELECT * FROM Personnel WHERE Agency LIKE ‘Nantes’

Agency LIKE ‘Nantes’

All worksites with a duration of 10.5 days

SELECT * FROM Client.Worksite WHERE Duration = 10.5

Duration = 10.5

All persons with a name containing the letter B

SELECT * FROM Personnel WHERE Personnel.name LIKE ‘%B%’

Personnel.name LIKE ‘%B%’

Specific values

This makes it possible to import without a source file.

The values to be imported are defined directly in the context of the import by entering them directly in the Value field.

 

Resource parameters

This information is useful for an import intended to insert new resources (without the use of a key).

Important

This means information assigned to new, imported resources. These parameters are not modified for an update to existing parameters.

  • Hourly calendar: Select the hourly calendar to assign to the new resources,
  • Daily calendar: Select the daily calendar to assign to the new resources,
  • Color : Select a color,
  • Icon: Choose the default icon if the dimension’s settings allow it.
  • Events creation rule: Choose the creation rule to be assigned to the new resources.

Resources filter

It is possible to define the resources to be considered to be present within the schedule when carrying out an import for modification.

To do this, simply choose a resource filter.

Important

This filter is useful for imports when updating existing resources.

Import mode

There are three potential import modes:

  • Creation only: this option is used for a simple insertion of resources,

  • Modification only: this option, along with the choice of keys, is used for a simple update of existing resources,

  • Modification/Creation: this option, along with the choice of keys, is used for an update of existing resources and for the creation of new resources.

Stored procedure

Warning

This parameter is useful and can be accessed only for imports from a database (other than MSAccess).

The name of the stored procedure should be defined.

Stored procedures should only have the following two parameters:

  • operational retcode OUT and type INTEGER: must take the value 0 if successful,

  • operational message OUT and type VARCHAR: must contain an explicative text, made available to the user.

Importing events – procedure to be used

Warning

This parameter is useful and can be accessed only for imports from a database (other than MSAccess).

This is used to launch another import context once the stored procedure has been run.

The user should choose an import context from those listed.

The list of proposed imports are of the type:

  • Database,

  • URL.

Correspondence tab

This tab is used to produce a correspondence between the source, which may be a file, a worksheet or a table – and the destination, which is one of the dimensions of the schedule.

This correspondence is defined on a field by field basis.

import_ressource_correspondance

Simply fill in the table, which contains several columns:

Dimension

This column take the name of the dimension chosen. This column contains the names of headings and the attributes chosen for the import.

By clicking on bouton-plus, it is possible to import:

  • Each heading of the dimension, individually,
  • Several headings at once when you click on (Select the attributes). This is useful when a large number of headings are involved in the import,
  • The internal identifier (UID) for the resources.

Warning

One cannot import values in headings of the following types:

  • Control column,

  • Operation,

  • Geolocation (if automatic localization is checked),

  • and event values.

If these headings are chosen they will automatically be defined as keys.

Source

Select, for each heading or attribute to be exported, the corresponding source field.

The name of each element to import should be chosen from the list of source fields. The name of the equivalent field does not need to be identical. This equivalence is valid for each time the source is saved.

The headings without equivalence are treated as follows:

  • for the insertion of new resources, the values of these headings are empty,
  • for modifications to existing resource, the values are not modified.

Value

In the event that information is not included in the source, the values of certain fields can be entered manually, using this column. This field value is the same for all imported resources.

 

Global variables

In a text heading, the following values can be added as a fixed value for an import:

  • $USERNAME: yields the ID of the user who ran the import;
  • $NOW: yields the date and time when the import was run;
  • $DATENOW: yields the day when the import was run;

  • $TIMENOW: yields the timestamp at which the import was run.

Note

The output date formats adhere to the format determined by the server language.

Now

In a Data-type heading, it is possible to give the date for the start of the import (“Now”) as the value for the date to be imported.

To do this, check the box opposite the selection of date.

_import_correspondence_now

 

Multiple values

The insertion of multiple values is possible, in headings of a given type:

  • Multiple choice list type heading,
  • Attachment type heading.

For this purpose, in the source you must specify the values to be imported, separated by the | character.

 

Key

For each entry in the source of the import, it is possible to check whether the information already exists as a resource in the schedule, thanks to the notion of a key.

A key is a Unique ID formed from one or more headings. A key therefore allows a distinction to be made between insertions or updates.

There are two possible options:

  • If no heading is checked as being the key, this is the insertion of new resources.
  • If one or more headings are selected as being a key, this is an update of existing resources and potentially the insertion of new resources.

Modifying an import context

 

To modify an import context, go to the Settings menu > Import/Export > Import resources, then Click on the context to modify.

The corresponding part is then enabled. Modify the parameters (see Creating an import context), then click on OK to save your changes.

Deleting an import context

 

To delete an import context, go to the Settings menu > Import/Export, then Right-click on the context > Delete.

The following message appears:

import_deleting

Click on:

 

  • Yes to definitively delete the context,

  • No to cancel the deletion.

Print Friendly, PDF & Email
1 Etoile2 Etoiles3 Etoiles4 Etoiles5 Etoiles (3 votes, average : 5.00 on 5)
Loading...
Consulting training

Need training?

Use our consulting services!