Error Message for New User

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
Nox
Posts: 65
Joined: Tue Nov 04, 2008 1:20 pm

Error Message for New User

Post by Nox »

Recently did an import of employees that completed without errors. Now when those regular employees login they are prompted to enter their personal information (first time login screen).

However, when they submit they get the following error:
Incorrect Input!

1. Invalid Province/State.
However, they are unable to edit their Country or State. The country is already filled in, and I can probably re-import the user data to fix the missing state information, but is this a bug or a feature based on policy?

I know that both country and state are drop down boxes, so to re-import the data, would I need to type the value exactly as it appears or do I need the numerical value that would exist in the database table?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

It sounds like the province/state wasn't imported properly perhaps. Employees aren't able to modify this themselves, so you will need to either re-import the data, or manually make the corrections.
Nox
Posts: 65
Joined: Tue Nov 04, 2008 1:20 pm

Post by Nox »

I am getting the message:
Invalid Unique Column
when I try to import again. In my .CSV file i have added a column called "country" and one called "province"

I have tried the following values for each respectively:

United States
Michigan

or

US
MI

the code I am executing is:

Code: Select all

php ./import_users.php -n -u ./user_column_map.txt ./employee_import.csv
This is being run from the /var/www/html/timetrex/tools/import/ folder, as root of course.

If I take out the new columns I have added, it works fine.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

If you specify "-u" you need to specify the unique column to go with it, ie:

-u employee_number

Whenever you try to import the same employee file twice, TimeTrex needs to know what the unique identifier is so it doesn't import data twice. Employee Number, UserName, SIN/SSN are all good unique identifiers.
Nox
Posts: 65
Joined: Tue Nov 04, 2008 1:20 pm

Post by Nox »

The following code examples are all still returning that error.


I tried putting the -u and specifying both columns:
php ./import_users.php -n -u country province ./user_column_map.txt ./employee_import.csv
Then I tried to specify just one column:
php ./import_users.php -n -u country ./user_column_map.txt ./employee_import.csv
Then I tried to put quotes around the column:
php ./import_users.php -n -u "country" ./user_column_map.txt ./employee_import.csv
Nox
Posts: 65
Joined: Tue Nov 04, 2008 1:20 pm

Post by Nox »

Oh, I got the column data from the user_column_map.txt file. Which is also the same column I used in the csv file.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Unique identifiers can only be:

Employee Number or UserName or SIN/SSN

The column names are:

employee_number, username, sin

Country isn't a unique identifier, because you could have 10 employees with the same country, so TimeTrex can't tell them apart. Whereas you can't have any employees with the same values for the above columns.
Nox
Posts: 65
Joined: Tue Nov 04, 2008 1:20 pm

Post by Nox »

Ok, I misunderstood what unique identifier meant. :lol:

Now that I have corrected my id10-T problem, the import worked fine. Thanks Shaun!
Locked