1

Topic: How to filter taxa in submit page?

I have an other problem/question. I need to create a submit page with sub-set of taxa. I have seen about the option called "Field used to filter taxa" and "Taxon filter items". I tried to select in this last  "Taxon Meaning ID" and in the other i put the Taxon Meaning IDs (for example 3252 and 3276) I have found in the Warehouse but when i see the form, i see all the taxa of the list, not the only two element i have selected. What i'm doing wrong? Thanks

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

2

Re: How to filter taxa in submit page?

This sounds okay to me.
You may need to clear the Indicia cache (IForm > IForm Admin Tasks menu).

I suppose you could make a mistake if the taxa you select are not in the species list you have selected.
You could also make a mistake entering the ID's. Enter one value per line.
You could set logging to debug level and look for clues in the warehouse log.

I have used this feature in the past and it did work okay for me then.
Sorry I have no better ideas.

Jim Bacon.

3 (edited by carlo_politi 13-06-2014 18:07:02)

Re: How to filter taxa in submit page?

Hi Jim, how do i set the debug level?
so, taxa has to belong to the species list not from different ones?

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

4

Re: How to filter taxa in submit page?

Hi Carlo

To set the debug level (actually called the 'log_threshold'), edit the warehouse file application/config/config.php.

Yes. To use the taxon filter you first choose a species list containing the taxa you want (e.g. All mammals) and then you use the filter to show a subset you are interested in (e.g. Field used to filter taxa = preferred name and Taxon filter items = wolf bear fox)

Jim Bacon

5

Re: How to filter taxa in submit page?

Hi Jim,
again with this question. I have logged the operation and if i set only one meaning ID, this is the log:

-----------
2014-07-21 13:02:28 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 13:02:28 +02:00 --- debug: Database Library initialized
2014-07-21 13:02:28 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 13:02:28 +02:00 --- debug: Requesting data from Warehouse
2014-07-21 13:02:28 +02:00 --- debug: Array
(
    [mode] => json
    [auth_token] => f5608dfa359e0efde589426877e824b22164542d
    [nonce] => 1a8099cc9428429c565e7e9c60108814fcd31360
)

2014-07-21 13:02:28 +02:00 --- debug: read authenticating Array
(
    [mode] => json
    [auth_token] => f5608dfa359e0efde589426877e824b22164542d
    [nonce] => 1a8099cc9428429c565e7e9c60108814fcd31360
)

2014-07-21 13:02:28 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:28 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:28 +02:00 --- info: Authentication successful.
2014-07-21 13:02:28 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 13:02:28 +02:00 --- debug: Database Library initialized
2014-07-21 13:02:28 +02:00 --- debug: Query ran for service call: SELECT "list_taxon_lists"."id", "list_taxon_lists"."title", "list_taxon_lists"."website_id"
FROM list_taxon_lists
WHERE ("list_taxon_lists"."website_id" IN (2) OR "list_taxon_lists"."website_id" IS NULL)
2014-07-21 13:02:28 +02:00 --- debug: Sending reponse size 1
2014-07-21 13:02:28 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 13:02:28 +02:00 --- debug: Database Library initialized
2014-07-21 13:02:28 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 13:02:28 +02:00 --- debug: Requesting data from Warehouse
2014-07-21 13:02:28 +02:00 --- debug: Array
(
    [mode] => json
    [termlist_external_key] => indicia:sample_methods
    [auth_token] => f5608dfa359e0efde589426877e824b22164542d
    [nonce] => 1a8099cc9428429c565e7e9c60108814fcd31360
)

2014-07-21 13:02:28 +02:00 --- debug: read authenticating Array
(
    [mode] => json
    [termlist_external_key] => indicia:sample_methods
    [auth_token] => f5608dfa359e0efde589426877e824b22164542d
    [nonce] => 1a8099cc9428429c565e7e9c60108814fcd31360
)

2014-07-21 13:02:28 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:28 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:28 +02:00 --- info: Authentication successful.
2014-07-21 13:02:28 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 13:02:28 +02:00 --- debug: Database Library initialized
2014-07-21 13:02:28 +02:00 --- debug: Query ran for service call: SELECT "list_termlists_terms"."id", "list_termlists_terms"."term_id", "list_termlists_terms"."term", "list_termlists_terms"."termlist_id", "list_termlists_terms"."termlist", "list_termlists_terms"."website_id", "list_termlists_terms"."termlist_external_key", "list_termlists_terms"."iso", "list_termlists_terms"."sort_order"
FROM list_termlists_terms
WHERE ("list_termlists_terms"."website_id" IN (2) OR "list_termlists_terms"."website_id" IS NULL)
AND "termlist_external_key" = 'indicia:sample_methods'
2014-07-21 13:02:28 +02:00 --- debug: Sending reponse size 1
2014-07-21 13:02:28 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 13:02:28 +02:00 --- debug: Database Library initialized
2014-07-21 13:02:28 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 13:02:28 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:45 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 13:02:45 +02:00 --- debug: Database Library initialized
2014-07-21 13:02:45 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 13:02:45 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:45 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:45 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 13:02:45 +02:00 --- debug: Database Library initialized
2014-07-21 13:02:45 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 13:02:45 +02:00 --- debug: Requesting data from Warehouse
2014-07-21 13:02:45 +02:00 --- debug: Array
(
    [mode] => json
    [preferred] => t
    [auth_token] => f5d88f4b3a0cb95f00a8d1ec53660acc40b8d5c9
    [nonce] => a01b493a657c71e1589c2e36947a139ac9e222e4
    [taxon_meaning_id] => 5659
    [taxon_list_id] => 35
)

2014-07-21 13:02:45 +02:00 --- debug: read authenticating Array
(
    [mode] => json
    [preferred] => t
    [auth_token] => f5d88f4b3a0cb95f00a8d1ec53660acc40b8d5c9
    [nonce] => a01b493a657c71e1589c2e36947a139ac9e222e4
    [taxon_meaning_id] => 5659
    [taxon_list_id] => 35
)

2014-07-21 13:02:45 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:45 +02:00 --- debug: Cache Library initialized
2014-07-21 13:02:45 +02:00 --- info: Authentication successful.
2014-07-21 13:02:45 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 13:02:45 +02:00 --- debug: Database Library initialized
2014-07-21 13:02:45 +02:00 --- debug: Query ran for service call: SELECT "list_taxa_taxon_lists"."id", "list_taxa_taxon_lists"."taxon_id", "list_taxa_taxon_lists"."taxon", "list_taxa_taxon_lists"."authority", "list_taxa_taxon_lists"."language", "list_taxa_taxon_lists"."common", "list_taxa_taxon_lists"."preferred_name", "list_taxa_taxon_lists"."taxon_group", "list_taxa_taxon_lists"."taxon_list_id", "list_taxa_taxon_lists"."preferred", "list_taxa_taxon_lists"."taxon_list", "list_taxa_taxon_lists"."website_id", "list_taxa_taxon_lists"."external_key", "list_taxa_taxon_lists"."allow_data_entry", "list_taxa_taxon_lists"."taxon_meaning_id", "list_taxa_taxon_lists"."taxon_group_id"
FROM list_taxa_taxon_lists
WHERE ("list_taxa_taxon_lists"."website_id" IN (2) OR "list_taxa_taxon_lists"."website_id" IS NULL)
AND "preferred" = 't'
AND "taxon_meaning_id" = '5659'
AND "taxon_list_id" = '35'
2014-07-21 13:02:45 +02:00 --- debug: Sending reponse size 1
-----------

While if i set 2 meaning ID (existing equals or different), the log is this:

-----------
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 12:57:48 +02:00 --- debug: Requesting data from Warehouse
2014-07-21 12:57:48 +02:00 --- debug: Array
(
    [mode] => json
    [auth_token] => f173ee52707360e1f8db10f6840c047e16d56ec6
    [nonce] => 23684ed38216ad801f94681bca4b56d474959c9e
)

2014-07-21 12:57:48 +02:00 --- debug: read authenticating Array
(
    [mode] => json
    [auth_token] => f173ee52707360e1f8db10f6840c047e16d56ec6
    [nonce] => 23684ed38216ad801f94681bca4b56d474959c9e
)

2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- info: Authentication successful.
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Query ran for service call: SELECT "list_surveys"."id", "list_surveys"."title", "list_surveys"."website_id"
FROM list_surveys
WHERE ("list_surveys"."website_id" IN (2) OR "list_surveys"."website_id" IS NULL)
2014-07-21 12:57:48 +02:00 --- debug: Sending reponse size 1
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 12:57:48 +02:00 --- debug: Requesting data from Warehouse
2014-07-21 12:57:48 +02:00 --- debug: Array
(
    [mode] => json
    [auth_token] => f173ee52707360e1f8db10f6840c047e16d56ec6
    [nonce] => 23684ed38216ad801f94681bca4b56d474959c9e
)

2014-07-21 12:57:48 +02:00 --- debug: read authenticating Array
(
    [mode] => json
    [auth_token] => f173ee52707360e1f8db10f6840c047e16d56ec6
    [nonce] => 23684ed38216ad801f94681bca4b56d474959c9e
)

2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- info: Authentication successful.
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Query ran for service call: SELECT "list_taxon_lists"."id", "list_taxon_lists"."title", "list_taxon_lists"."website_id"
FROM list_taxon_lists
WHERE ("list_taxon_lists"."website_id" IN (2) OR "list_taxon_lists"."website_id" IS NULL)
2014-07-21 12:57:48 +02:00 --- debug: Sending reponse size 1
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 12:57:48 +02:00 --- debug: Requesting data from Warehouse
2014-07-21 12:57:48 +02:00 --- debug: Array
(
    [mode] => json
    [auth_token] => f173ee52707360e1f8db10f6840c047e16d56ec6
    [nonce] => 23684ed38216ad801f94681bca4b56d474959c9e
)

2014-07-21 12:57:48 +02:00 --- debug: read authenticating Array
(
    [mode] => json
    [auth_token] => f173ee52707360e1f8db10f6840c047e16d56ec6
    [nonce] => 23684ed38216ad801f94681bca4b56d474959c9e
)

2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- info: Authentication successful.
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Query ran for service call: SELECT "list_taxon_lists"."id", "list_taxon_lists"."title", "list_taxon_lists"."website_id"
FROM list_taxon_lists
WHERE ("list_taxon_lists"."website_id" IN (2) OR "list_taxon_lists"."website_id" IS NULL)
2014-07-21 12:57:48 +02:00 --- debug: Sending reponse size 1
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 12:57:48 +02:00 --- debug: Requesting data from Warehouse
2014-07-21 12:57:48 +02:00 --- debug: Array
(
    [mode] => json
    [termlist_external_key] => indicia:sample_methods
    [auth_token] => f173ee52707360e1f8db10f6840c047e16d56ec6
    [nonce] => 23684ed38216ad801f94681bca4b56d474959c9e
)

2014-07-21 12:57:48 +02:00 --- debug: read authenticating Array
(
    [mode] => json
    [termlist_external_key] => indicia:sample_methods
    [auth_token] => f173ee52707360e1f8db10f6840c047e16d56ec6
    [nonce] => 23684ed38216ad801f94681bca4b56d474959c9e
)

2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:57:48 +02:00 --- info: Authentication successful.
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Query ran for service call: SELECT "list_termlists_terms"."id", "list_termlists_terms"."term_id", "list_termlists_terms"."term", "list_termlists_terms"."termlist_id", "list_termlists_terms"."termlist", "list_termlists_terms"."website_id", "list_termlists_terms"."termlist_external_key", "list_termlists_terms"."iso", "list_termlists_terms"."sort_order"
FROM list_termlists_terms
WHERE ("list_termlists_terms"."website_id" IN (2) OR "list_termlists_terms"."website_id" IS NULL)
AND "termlist_external_key" = 'indicia:sample_methods'
2014-07-21 12:57:48 +02:00 --- debug: Sending reponse size 1
2014-07-21 12:57:48 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:57:48 +02:00 --- debug: Database Library initialized
2014-07-21 12:57:48 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 12:57:48 +02:00 --- debug: Cache Library initialized
2014-07-21 12:58:27 +02:00 --- debug: PgSQL Database Driver Initialized
2014-07-21 12:58:27 +02:00 --- debug: Database Library initialized
2014-07-21 12:58:27 +02:00 --- debug: Global GET, POST and COOKIE data sanitized
2014-07-21 12:58:27 +02:00 --- debug: Cache Library initialized
2014-07-21 12:58:27 +02:00 --- debug: Cache Library initialized
-----------

Why? thanks....

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

6

Re: How to filter taxa in submit page?

Good afternoon to everyone,
no one has had my same problem or any idea related to my last post?
Thanks...

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

7

Re: How to filter taxa in submit page?

Hi Carlo,

Did you solve this? I am/was having the same problem. In my case, it works okay if I select "Taxon group title" to filter on and then select the subset I want BUT IT ONLY WORKS if the "Species Names Filter" is set to "Only allow selection of species using names which are flagged as preferred". If I have the "Species Names Filter" set to Only allow selection of species using common names in the user's language" - which is what I want - it seems to ignore the Taxon group filter and shows all species regardless.

I assume this is a bug...

Alice

8

Re: How to filter taxa in submit page?

Hi Alice,
i haven't solved at all... i'm trying to see if the 0.7 iform for drupal 7 can solve the problem but i get some bugs even there..

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

9

Re: How to filter taxa in submit page?

I'm using iform in Drupal 7... did you try changing the Species Names Filter and seeing if it makes a difference?