Hi Ian and welcome.
WOuld it be fair to assume that the records have a minimum of 3 rows?
Did you choose 5 rows for the template sample because some records may have 5 rows or is the max 4?
Is the second column (OUTPULSE, etc) data or a 'fixed' label describing the columns which follow. By 'fixed' I mean that there are a limited number of values and the text itself is not important except as an identifier of what the 2 subsequent columns are recording.
It does look a little tricky, especially if it comes early in your exposure to Monarch. There's nothing like diving in at the deep end!
Unfortunately the only consistent information for a given record (spread across multiple rows) is having the same number as the 1st entry.
The entries "OUTPULSE", "ECHO", "NPI" etc. can appear in any order or not at all. Also as you can see these different commands have a different number of parameters; i.e. OUTPULSE has 1 additional value whilst NPI has 2 additional values.
I've checked through the whole of my input file and the maximum number of rows for a given record is 5 (the last one having "END;").
I set up an detail template that covered 5 rows and had 16 fields.
1 for the 1st number on the 1st row (no need to get the same number from the other rows).
Then 5 x 3 fields for the 5 rows with the 3 entries.
The trouble is that if I have a record that has only 2 rows it still takes 5 rows, so it takes some of the next record.
The only thought I just had was to write a macro in Excel (this is the original format my input data is in) to add say 5 blank rows between each record to stop this happening.
The entries OUTPULSE, ECHO, NPI are actually commands (this file is a part of a configuration script from a PBX).
The OUTPULSE command has 1 parameter
The ECHO command has 1 parameter
The NPI command has 2 parameters
Cheers Ian /b[/quote]So if we donlt trap the OUTPULSE, ECHO and NPI fields but name the parameters for them in cols 3 and 4 (where appropriate) that would give you the result you require? I assume the 'END' has no real purpose for you. Just an end of record marker?
it's the variable number of rows that's the issue.
cheers ian /b[/quote]OK, let me take my thoughts a stage further.
If you don't need the "END" line (it always exists) you could work with a 4 line template sample so the 3 linse which are the minimum plus a blank line below a 3 line record.
No overlap there.
Map your column 1 field in row 1
Map a field in row 1 for the widest possibly positions (of any field on any row )in column 3.
Name it for one of the text strings that might appear in column 2 - OUTPULSE for example. Go to the advanced properties for that field and in the "Start Field On" parameter use the "Preceding string" option and enter "outpulse" as the preceding string.
Repeat this on the next line for one of the other text strings that might appear in col 2.
For the NPI string you will also need a field in col 4. You can use the same preceding string but obviously will need a different field name.
The order does not matter. The NPI definitions don't have to be on the same line but it may make maintenance easier in the future if they are consistent.
I have assumed that you can trap the records accurately without problems.
See if that works for you. I am slightly concerned that you included an "etc" in there at one point. If the number of potential parameters in col 2 exceeds 4 the success of this approach will be limited. On the other hand if there were many options but you only wanted to see and report 4 of the parameters doing this would work as a great filter!
If you can accept an ever present "END;" then you smallest record woould still allow 4 fixed fields to be defined in col 2 but the values assigned would vary as you described above, The preceding string fields would still work but there may not be enough of them. Introducing extra blank lines - as you suggested previously - could be useful to extend the number of rows available and therefore the number of parameter variable strings for which fields could be set.