User - Upload
- Last UpdatedSep 10, 2024
- 3 minute read
Upload or edit multiple users
You can perform a batch operation to create or change values for multiple users.
Users can be uploaded to OSM using a text file. Users will then either be created or values for users will be changed.
Requirements
-
File must be a text file (.txt) with tab-separated columns.
-
Database does not need to be upgrade mode.
Create list
Use Microsoft Excel to build a list of users and when finished, save the Excel file as Text (Tab delimited).
The first line in the file must be a header row with names of columns. The sequence of columns must be in this order:
-
User name (required)
-
Display name (required)
-
Email address
-
Title
-
Employee no
-
Company
-
Company unit
-
Group
Definition of columns
|
Name of column |
Value is required |
Comment |
|---|---|---|
|
User name |
Yes |
The user name value will be converted to uppercase. If no value, the user name will be equal to Display name in uppercase and spaces will be replaced with a dot (.) For example, Farm User will become FARM.USER. |
|
Display name |
Yes |
Required. |
|
Email address |
No |
Will be converted automatically to lowercase. |
|
Title |
No |
Optional |
|
Employee no |
No |
Optional |
|
Company |
No |
Optional |
|
Company unit |
No |
Code for a company unit. Value will be converted to uppercase. User will be linked to given company unit. If company unit is not valid, then user will not be created or updated. |
|
Group |
No |
Code for an access group. User will be added as member of group. If group code is not valid, then user will not be created nor updated. |
Guidelines
-
Even if a column contains no values at all, it must exist in the file.
-
If a user already exists in database (using User name as key), then all their values in the database will be updated to values in the file.
-
All values will be trimmed during operation (spaces before and after string will be removed).
-
If a value in the file is empty, then corresponding value in database will be set to empty (NULL).
-
If value is required and is not present in the file, then user will not be created nor updated.
-
A log file will be created in same folder as file to upload. Log file will have same name as selected file, but with extension .log.
Upload users
-
Select Upload users radio button on left side of screen.
-
Select a file by using the Select file button.
-
Select Upload button to perform the operation.

When operation is complete, you will see a message at bottom of screen.
Validation
A validation is performed before the update to the database.
-
Validation must be successful to proceed to the update operation.
-
Any message during this validation will point to which row failed.
-
Validation error will appear at bottom of screen.
Remember that row 1 is header, row 2 is first user and so on. If any error occurs during this validation, the operation is terminated.
Row 1
Column Header
Column Header
Row 2
User 1
Value 1
Row 3
User 2
Value 2
During validation, the following happens:
Step 1 - Validates file itself, which means that required data will be checked.
Step 2 - Checks if company unit values and group values exist in database.
Database transactions and errors
For each row in the file, a database statement will try to either create a user or update a user.
-
If statement was successful, then transaction will be committed and log file will be updated.
-
If statement failed, then a rollback will be performed and an error will be added to log file.
This means that if, for example, a file contains 100 users and 2 of those users cannot be created or updated, then 98 of those users will be uploaded into database.