Currently my workspace runs a number of calculations (such as legth and counts) on all shapefiles contained within a selected folder, and then writes them all to an Excel spreadsheet. There are also two additional parameters to define:
1. Selecting a shapefile
2. Selecting an Attribute (The list of attributes comes from the folder selected earlier)
And for this individually selected shapefile, additional, seperate calculations are done.
The Problem I have though, is that every thing seems to work perfectly, and my calculations for the parameter defined attribute seems okay... But, I have no way of extracting this value, or turning the parameter value back in to a attribute to populate in the spreadsheet.
Example:
Step1 - Folder is selected containing all shapefiles
Parameter: FOLDER - (ROADS.shp, RIVERS.shp, LANDUSE.shp, etc...)
Step 2 - Additional single file (within that folder) is selected to run extra tests on
Parameter: FILE - ROADS.shp is selected
Step 3 - Attribute is selected for for extra tests to be sorted by.
Parameter ATTRIBUTE - FILED ROADS.shp - LEVEL is selected attribute. Output will be sorted by this attribute
So my standard output for all the other files in that folder looks something like this
Feature | Counts | Length
ROADS | 23 | 208km
RIVERS| 17 | 314km
And so on...
Then, for the Parameter selected feature, and the paramter selected Attribute, an additional tab is created, that SHOULD look like follows:
Note: The ROAD.shp has values from 1-4 in the LEVEL attribute
attribute | Counts | Length
1 | 3 | 53km
2 | 7 | 47km
3 | 5 | 38km
4 | 8 | 70km
Unfortunatley, every thing goes fine up untill the point after all the calculations, where the attributes in the additional tab needs to be populated and written. I've tried using a ParameterFetcher on the ATTRIBUTE parameter, and then create a target attribute named just "attribute", but then I get the following:
attribute | Counts | Length
LEVEL | 23 | 208km
LEVEL | 23 | 208km
LEVEL | 23 | 208km
LEVEL | 23 | 208km
And that's just not right. So it seems to retrieve the value selected in the paramter, instead of the actual value of level. However, the fact that there are still 4 records comming through, gives me some hope, seeing as there are 4 unique LEVEL values.
I appologise beforehand for any confusion, as this kind of question is very difficult to explain. Any Kind of help would be greatly appreciated.
Kind Regards,