1 (edited by cwdee 04-01-2016 11:13:44)

Topic: Customising Utilities / Easy download 2

Hi

Where do I find the parameters that are available for the Utilities report: 'Easy download 2'? I have searched the GitHub without success. I don't seem to be able to supply taxon_group_id=470,540.

I have used a single survey for the whole website, to capture mammal, amphibian and reptile records, but want to be able to provide one download form for mammals and one for reptiles and amphibians. I didn't define separate surveys, because the requirement was to have a single records capture form for all three taxa.

Thanks (and Happy New Year), Chris

Chris Dee
Garganey Consulting

2

Re: Customising Utilities / Easy download 2

Hi Chris,

If you look at the settings for the 'Easy Download 2' form you will see that you can configure the reports that it will use for each output format. For exampe, the default report for CSV download is 'Occurrences Download using standard filters'.

I can locate this in GitHub at https://github.com/Indicia-Team/warehou … wnload.xml

I noticed that the query contains an attribute standard_params="true". I had never seen this before. The first thing I do when I encounter something new in Indicia is to Google 'indicia readthedocs unknown thing'. This is the most effective way I have found to locate something in the Indicia documentation.

Bingo! See http://indicia-docs.readthedocs.org/en/ … ard-params
The parameter you require is 'taxon_group_list' - a comma separated list of taxon group IDs to filter against.

Hope that works,
Jim.

3

Re: Customising Utilities / Easy download 2

Thanks - it was the connection between 'Occurrences Download using standard filters' and 'filterable_occurrences_download.xml' that I failed to make.

This is working now, but I still have two parameters in the 'Records to download' section of the form that I would like to default, but don't see them in the standard_parameters documentation of the xml.
- Download type: offers either 'My records for reporting' or 'All records for reporting'. How do I deafult that to 'All...'
- Filter to apply: has no options, but I want it to default to none.

Thanks, Chris

Chris Dee
Garganey Consulting

4

Re: Customising Utilities / Easy download 2

Hi Chris

This is all foreign territory to me so I am trying to read the code.

From what I can understand, the Download Type is presented by the code of the 'Easy download 2' form and cannot be hidden without modifying the code.

The Filter to Apply should be hidden if there are no available filters. That is what I experience. This happens in https://github.com/Indicia-Team/client_ … load_2.js.

However, you may be better off backing out of this and using the first version of the Easy Download form. (I have to uncheck the recommended page types option to be able to choose it.)

This uses https://github.com/Indicia-Team/warehou … load_2.xml as the default report and has check boxes in the configuration to determine whether all or own data may be downloaded.

Jim Bacon.

5

Re: Customising Utilities / Easy download 2

OK - I back-tracked to 'Easy Download' with Occurrences Download 2. But now I cannot get CSV download to extract anything.

All the other extract formats work fine. Is there something special about CSV? Is it able to use Occurrences Download 2?

Thanks, Chris

Chris Dee
Garganey Consulting

6

Re: Customising Utilities / Easy download 2

Does anyone have any suggestions on how I might debug this? Can anyone confirm that the CSV option in 'Easy Download' works with Occurrences Download 2?

Thanks, Chris

Chris Dee
Garganey Consulting

7 (edited by Jim Bacon 18-01-2016 17:17:38)

Re: Customising Utilities / Easy download 2

Hi

I've just tried this on a test system with csv and tsv downloads. Both returned the same records so I'm not recreating your problem.

I'm using the test warehouse and the Occurrences Download 2 report in both cases. The Drupal form just constructs a url to request the download from the warehouse. Using browser tools to capture the request might reveal the problem. The only real difference between the two requests should be the mode value included in the query string.

My request looks like this (with a bit of formatting for legbility)

http://testwarehouse.indicia.org.uk/index.php/services/report/requestReport?
report=library/occurrences/occurrences_download_2.xml &
reportSource=local &
mode=tsv &
nonce=369e82... &
auth_token=f82f4f... &
limit=20001 &
offset=0 &
currentUser= &
ownData=0 &
location_id= &
ownLocality=0 &
taxon_groups= &
ownGroups=0 &
surveys=72 &
ownSurveys=1 &
smpattrs= &
occattrs= &
searchArea= &
idlist= &
quality=!R &
date_from= &
date_to= &
sharing=data_flow

Jim Bacon