Skip to main content

Plant Group Rate Import File Format

Written by Denisa Arjoca
Updated over a month ago

The Import Plant Group Rates import routine works in two ways.

The first is a simpler (and somewhat limited) import for which the following fields are required in the import CSV file.

Asset Group Code,Description,Type,Valid From,Default Hire Methods,Weekly Internal,Weekly External,1 Day %,2 Day %,3 Day %,4 Day %,5 Day %,6 Day %,Daily Internal,Daily External,Monthly Internal,Monthly External,Lump Sum Internal,Lump Sum External,Hourly Rate 1,Hourly Rate 2,Hourly Rate 3,Hourly Rate 4,Hourly Rate 5,Hourly Rate 6,Hourly Rate 7,Hourly Rate 8,Hourly Rate 9,Hourly Rate 10,Default Ownership Charge,Default Ownership Charge Frequency.

The file can contain the field labels (column headings) as a first line, in which case you need to tick the Does the first row in the file contain captions? tickbox.

The second is a more flexible way of importing records.

  • The first line in the CSV file must be FILE-FORMAT=<table>. In this case, as you are importing plant group rates the <table> will be pc_group.

  • The second line should include all the fields you want to import that are related to <table>. You will need to reference the System Table Summary or turn on the &helpmode=stack prompt to view the fields you wish to import. Care must be taken to include the key fields of the <table>, which in this case are cmg_code (plant Group Code) and pgr_from (Valid From Date). Even though the unique key for pc_group is kco+cmc_type+cmg_code+pgr_from, the kco and cmc_type can be included in the CSV file but are not mandatory because they can be calculated or worked out from cmg_code. A rule of thumb would be to include all the fields in the primary unique key of the <table>.

Using this format, the Does the first row in the file contain captions? tickbox is ignored as the import routine expects the FILE-FORMAT row first followed by a row of table fields.

Below is an example file:

FILE-FORMAT=pc_group
cmg_code, pgr_from, pgr_ownrate, pgr_ownfreq, pgr_rate__1, pgr_rate__7, pgr_wperc__1, pgr_wperc__2, pgr_wperc__3, pgr_wperc__4, pgr_wperc__5, pgr_wperc__6, pgr_rate__4, pgr_rate__10
MGP001, 3/01/2010, 290, W, 260, 410, 15, 25, 35, 45, 55, 65, 25, 55

Did this answer your question?