1 (edited by niki.clear 08-11-2017 12:59:33)

Topic: Custom fields to explore page

HHello

I'm trying to create a bespoke fields for one of your recording groups on our Indicia website.

I've set up the group with it's own survey and created the attributes through the Indicia warehouse interface. I'm able to input the data for these fields but I'm struggling to to get these fields to populate in the group explore table and show a text input box in the filter row for these fields, which will allow the users to filter the table based on the contents of these fields. It would also be useful to have these additional fields show on the record details, which I'm assuming would involve creating a replicate of the view record details page specifically for the group which will show these fields and link this page to the explore page Actions>'View Record' settings?

What is the best way to set this up so members of the recording group can input the data they need and pull it back out again. Sorry if this is a silly question - I wasn't involved with setting up our Indicia website so I'm still trying to figure it all out.

Many thanks,
Niki

2

Re: Custom fields to explore page

Hi Niki

It sounds like you are doing well in figuring it out.

On your explore table, do you have a filter row with inputs on some columns but not on the new ones?
If so, I can see there is a conditional statement in the code (report_helper.php around line 477) that goes

          if (isset($field['datatype']) && !empty($caption)) {
            add input to filter row
          }

The two parts to the condition are provided by a merge of the information about the column in the report and the columns configuration which you may have set up.

The datatype should come from the report you are using. Refer to http://indicia-docs.readthedocs.io/en/l … ering.html

The caption is set in the lines

          if (empty($field['display']) && empty($field['fieldname'])) {
            $caption = '';
          }
          else {
            $caption = empty($field['display']) ? $field['fieldname'] : lang::get($field['display']);
          }

You can ensure the caption has a value by specifying a 'display' value in the column configuration.

Hopefully there is a clue in there somewhere to help you along.

Jim Bacon.

3

Re: Custom fields to explore page

Thanks for getting back to me Jim.

I think the actual issue is that I can't seem to get the explore page to pull/link to the data in the new sample attributes I created through the warehouse interface. I've been able to do this before for sample attributes which already existed in the indicia warehouse (phase 1 habitats), but can't figure out how set the explore page to pull new attributes I created.

In the Column Cofig. List I've tried adding the new field by adding

fieldname: attr_sample_term_1125
display: PIP Survey

the field appears in the Explore table but it isn't pulling the data.

Any help/adice would be really appreciated.

4

Re: Custom fields to explore page

Hi Niki

I can't know but I'm a little suspicious of that field name you are using.
I also don't know what report you are using and how that is working so this is a bit of a blind guess coming.
However, take a look at http://indicia-docs.readthedocs.io/en/l … ttrs-label and see if that has any relevance for you.

Regards,
Jim Bacon.