Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
panelIconId2699
panelIcon:gear:
panelIconText⚙️
bgColor#EAE6FF

Administration permission required: Period Types

In Phocas, period types define the core increments of time that allow users to

analyse

analyze their data, forming the basis of defined periods. The default period types are months, days and years

. Administrators with the 'period types' profile option ticked can add

but other period types can be added, such as quarters or weeks

. If you have this permission you can set a new period type by manually entering date ranges or importing a file containing the start and end dates for each period. You can also add a period type based on synced data.

Table of Contents
maxLevel3

To view, add and edit period types select Administration > Period types.

Image Removed

Image Removed

Manually add date ranges

Step 1. Choose New, name the new period type (in this example 'Quarter') and Save

Image Removed

This new period type will appear in the list of period types.

Image Removed

Step 2. Define each moment of your new period type. To do this, select the period type you just created and choose Add.

Image Removed

In the dialog that opens, enter a name, and the required date range and Save.

In this example we've repeated this step for each of our 4 quarters, as shown below.

Quarter 1Quarter 2Quarter 3Quarter 4

Image Removed

Image Removed

Image Removed

Image Removed

Step 4. Once complete, you can review all your moments in a list, as shown. This period type will now be available in the date dropdown in the Designer tool.  Image Removed
Note that you can not

.

You can decide what defined periods (date ranges) are listed in the Period menus in Phocas for each database. Users can add their own personal defined periods. However, if a defined period is required by several users, it is better to make it available across the database. That way all users (provided they have permission) can access it from the Period menu. See Set defined periods for a database and Add your own defined period.

If you have permission to design databases, you can set the period types that are available for a database in Designer. See Modify a database > Select a period type.

View all period types

Click the Phocas menu button > Administration >Period types to open the Period Types screen, which displays a list of all your period types. You can then add, edit and delete periods types.

Image AddedImage Added

Add a period type

The process of adding a new period type has two key steps. First, you add the period type, then you define each moment in that period, in other words, add the collection of date ranges that make up the period. You can define the moments in three ways; (A) manually enter the moments, (B) import a file containing the moments or (C) base the period type on synced data.

  1. On the Period Types screen, click New.

  2. In the Period Types window, enter a name for the new period type, for example, Quarter.

  3. If you want to base the moments on synced data (option C above), select the Is Sync Period checkbox. Additional options display. Skip to expandable section (C) below.

  4. Click Save

    Image Added
  5. Proceed to define each moment in the period type using one of the methods outlined below (expand the applicable section).

    Image Added
Expand
title(A) Manually add moments
  1. On the Period Types screen, click the new period type to open its Moments screen.

    Image Added
  2. On the Moments screen, click Add.

  3. Enter a name for the moment (such as Quarter 1) and the date range, then click Save.

    Image Added

    Note that you cannot enter dates that overlap with an existing period type. If you try to do this, you will

see
  1. get a warning

, allowing you
  1. message and have to adjust your dates. 

    Image Modified

Import a file containing dates for new period type

Step 1.  Select Administration > Period types.

Step 2.  Choose New, name the new period type (in this example, Weeks) and Save.  This new period type will appear in the list.

Step 3.  Upload the file that contains details of your new period type.  To do this, select the period type you just created and then choose Import.  You can download the file used in this example here; it is similar to the screen shot below.  

Image Removed

Step 4.  Set the date format to match that of the imported file (for the screen shot above we'll need to choose dd/mm/yyyy) and Upload.

Important note about file format

  1. Repeat the above two steps to define the other moments (such as Quarter 2, Quarter 3 and Quarter 4) in the period type.

  2. Review all the moments in the period type, then click Close.

Expand
title(B) Import moments
  1. Prepare a file that contains the moments in the new period type.

    • The file must be a .txt file with the columns Name, Start Date, End Date and Year in that order with no headings, as per the image below. 

    • The Name must be unique.

 Although
    • Although in reality there might be a Week 1 every year, you

'll
    • need to name your moments individually. For example, Wk1-2016, Wk1-2017

, etc
    • and so on.

    • Data in the Year column must be 4 numbers only.

 If
    • If your moment spans a change in year, it is recommended

to choose

Select new period type in Designer

Once you have created a new period type, it becomes available for selection in Designer

    • you use the year that matches the Start Date.

Image Removed
    • You can download and edit the file used in this example here.

      Image Added
  1. On the Period Types screen, select the new period type and click Import.

  2. Upload the file.

  3. Set the date format to match that of the imported file (in this example it is dd/mm/yyyy) and click Upload.

    Image Added
  4. Review all the moments in the period type, then click Close.

Expand
title(C) Add a sync period type
Once data is synced

If you have synced data, you can add a period type based on

this synced

that data.

Choose New and tick 'Is Sync Period Type'.

Image Removed

Select a Sync Source from the dropdown list. Once you select a source, a list of Sync Item becomes available.

Note that the Sync item must have

Notes about the sync period type:

  • When the sync source is updated, the period type is also updated. The moments are purged and then the sync rows are loaded.

  • The moments within a period type linked to a sync item can only be edited by re-syncing the item.

  • You can import moments from such a sync item against any Period Type that is NOT linked to a sync item. The import overwrites any existing moments against the period type.

Prerequisite: Ensure the synced data item contains the moments in the new period type, organized into four columns in this order:

Name, Start, End, Year.

  • Name (text)

  • Start (date time)

  • End (date time)

  • Year

column must be an integer.

Image Removed

Select from the list and Save. Once you save, the moments are populated.

Image Removed

Notes

  • The moments within a Period Type linked to a Sync Item can only be altered by re-syncing the Sync Item.
  • Administrators with permission can import moments from such a Sync Item against any Period Type that's not linked to a Sync Item. The import overwrites any existing moments against the Period Type.
  • When the Sync Source is updated, the period type is also updated. The moments are purged and then the sync rows are loaded.
Image Removed
  • (integer)

Continuing from step 3 above, where in the Period Types window you select the Is Sync Period checkbox and additional options display:

  1. Select the source from the Sync Source dropdown list.

  2. Select the data item from the Sync Item dropdown list.

  3. Click Save. The moments are added automatically for you.

    Image Added
  4. Click the new period type to review all the moments.

    Image Added

Edit or delete the moments in a period type

  1. On the Period Types screen, click the period type to open its Moments screen.

  2. Take the applicable action:

    • Edit the moment details: Click the moment (blue link), make your changes and click Save.

    • Delete a moment: Select the moment row and click Delete > Yes.

  3. Click Close.

Delete a period type or moment

On the Period Types screen:

  • To delete a period type, select the period type row and click Delete > Yes.

  • To delete a moment, click the period type to open its Moments screen, then select the moment row and click Delete > Yes.

On this page

Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse