Question
How do I add timesheet numbers to crew timesheets?
Answer
Background
For crews in the field, particularly for field services, paper timesheets have timesheet numbers. Often this functions as a tracking number that groups several timesheets together.
PTS Enhancement: Crew Timesheet Number
Pacific Timesheet can automatically compute a unique crew timesheet number for your crew timesheets. The number is a concatenation of the Crew (Group) ID and the date, for example "C1234-20210704". This format can be modified by contacting your PTS application specialist who will need to modify your database (see the Advanced Note below). To add the crew timesheet number to your crew timesheets follow these steps:
Step 1. Creating Crew Timesheet Number Field
Create a timesheet template custom field from the System > Templates > Manage Custom Fields page with this exact name and data type:
Name: Crew Sheet No X
Type: Text field
Important Field Setup Notes:
- Creating the field with the above name initially sets the field's database name to that value to "xCrewSheetNoX."
- Do not attempt to give the field default value and do not make it a required field.
- Once created with this name, remaining field settings will automatically be set by the system.
- Once created, you can click the "Edit" button and change the display name of the field.
- Renaming the custom field's display name will not change the variable name - the variable MUST be named "xCrewSheetNoX" in order for the automatic generation of the sheet number to work.
Step 2. Add Timesheet Number Field to Appropriate Timesheet Templates
Next, add the crew timesheet number field created in step 1 to each crew timesheet template you would like to display a unique auto-generated timesheet number.
- Navigate to System > Templates > Edit template
- Click on the plus (+) button to add the timesheet number field.
Important Base Timesheet Template Setup Notes:
- Make sure to NOT enable this field as required
- Make sure to NOT enable this field a "Work Only" field. It must be unchecked to be applied to Work and Leave entries.
- You should configure the field as a Detail or a Timesheet Column field.
- You can also enable it as "Manager Only - Editable only by managers".
Step 3. Configuring Crew Timesheet Options
For each crew timesheet template set the timesheet number field as a Day field so it displays in the header of the crew timesheet.
- As an Administrator, navigate to the Crew Timesheet tab.
- Click on Tools.
- Then click on Timesheet Options.
- Next to the Day Field box, click the Plus (+) button.
- Then choose the timesheet number field from the list.
- Then click OK.
- This setting will display the timesheet number field in the header of the crew timesheet.
Step 4. Configuring Assets and Logs Tabs
If you have Assets and Logs enabled, you will need to create an IDENTICAL timesheet number custom field that will be applied to all Asset and Log Entries as you did in step 1.
Create an asset entry custom field Assets > Asset Entries > Entry Fields > Manage Custom Fields page with this exact name and data type:
Name: Crew Sheet No X
Type: Text field
Important Field Setup Notes:
- Do not set a default value or make it required.
- Also, do not restrict it to certain asset types by setting the filter - leave that unchecked.
- Also note that you do NOT need to add this field to the list of entry fields for your asset entries.
Testing Parameters:
Once these steps are complete:
- A unique system-generated "Crew Timesheet No." (or whatever you have renamed the display name to) will be display in the header of the appropriate crew timesheets.
- If the Crew (Group) UID is blank, the system will use the Crew (Group) database ID in its place.
- It will be auto-populated with the correct value.
- When the crew timesheet is saved the value will flow into the individual entries.
- This applies to the iOS/Android PacificCrew app, also.
- If you do not see the value auto-populated then you have most likely created the timesheet template custom field with the wrong name (see step 1).
Advanced Note: Setting Timesheet Number Formats
Currently there is no UI for changing a timesheet number format. However, this can be done as a using backend database scripts by technical services during an implementation.
Use Case 1: Inserting a Hyphen between Crew (Group ID) and Date
For example, for a self-hosted system, to add a hyphen between the Crew (Group) ID and the date you would run the following scripts:
delete from t_system_attr where name='com.three21.timesheet.api.crew.crewsheetnofmt' and systemid=1
go
insert into t_system_attr (systemid,name,val) values (1,'com.three21.timesheet.api.crew.crewsheetnofmt','{Group.uid}-{Day.id}')
go
Note you need to change 'go' to ';' for mysql.
Comments
0 comments
Article is closed for comments.