1

Topic: Notifications question

hi,
I have a notifications page which was showing all the messages by default when a user visited the page. It now isn't showing any messages but instead has a drop down of options and a Run Report button.

I've looked for documentation about how to set this to default to showing all messages while retaining the drop down of options and a filter button (like on iRecord) but I can't find any.

Can anyone tell me what the report parameters are that I need to set to achieve this please?

Cheers,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

2

Re: Notifications question

Hi Fiona

In general, where a page is showing a report and that report requires some parameters to be supplied you will get what you are seeing. Sounds like the report you are using has been modified and requires a parameter where previously it didn't.

It is also the case that the configuration for a page which shows the output from a report usually includes two fields called preset and default parameter values. The help text under these fields explains what they are.

In brief, use preset values for any report parameter to avoid the user having to enter it and default values to allow the report to run initially but be overridden if the report is re-run.

It sounds like you will want to set a default value. You will need to know the parameter name and value to use. If you use a web inspector like Firebug on the drop down list that has appeared, the input name (based on a quick inspection of some other reports) will be "report-output-param_name" and the values will be listed against each option. You'll then enter param_name = value where you replace the italics with the values found with the web inspector.

Hope that fits your circumstances.

Jim Bacon.

3

Re: Notifications question

Thanks Jim,

yes I am trying to set the default parameter but can't get it to work. I'm pretty sure I should be using "source_filter=all" to make sure "anything" is selected and so all notifications show but since it isn't working, I'm clearly going wrong somewhere.

Dum dee dum...

Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

4

Re: Notifications question

Hi

Which report is being used here?

Jim.

5

Re: Notifications question

PS. You are so kind to say "I'm clearly going wrong somewhere". So many people would say "There must be a bug in your code."

Jim.

6

Re: Notifications question

:D fairly certain it's usually me!!

I'm using the Reporting > Dynamic Report Explorer

The User Interface is:
=Messages from other users=
[notifications_centre.user_messages_grid]
@default_edit_page_path=edit-details
@view_record_page_path=record-details
=Automated checks=
[notifications_centre.auto_check_messages_grid]
@default_edit_page_path=edit-details
@view_record_page_path=record-details

The Preset parameter values are:
smpattrs=
occattrs=
location_id={profile_location}
taxon_groups={profile_taxon_groups}
currentUser={profile_indicia_user_id}

and the Default parameter values are:
idlist=1
searchArea=
source_filter=all  << this one made up by me and clearly wrong!!

I'm trying to mirror this page:
http://www.brc.ac.uk/irecord/notifications

and my page is:
http://www2.habitas.org.uk/records/notifications

I'm 99% sure that when I first made this page that it automatically showed all messages but I think some nice new filtering has been introduced and I just can't figure out how to get it to default to show all messages with the filtering as an option.

I can't find it in my emails but I'm pretty sure I got this user interface set up from John as I certainly didn't write it myself.

Cheers,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

7

Re: Notifications question

Hi

Well this is nothing like I have any experience of but I thought to look in the client_helpers/prebuilt_forms/extensions/notifications_centre.php file and there I read the following comments

Use options @sourceType=S,V to show specific source types on the grid, the "S,V" in this example can be replaced with any source_type letter comma separated list.
Removing the @sourceType option will display a filter drop-down that the user can select from.

The source types I gleaned from comments in the database

Value can be T (= trigger), C (= comment), V (= verification), A (= automated record check), S (= species alert), VT (= verifier task), AC (= achievement)'

So we were barking up the wrong tree altogether. Try adding

@sourceType=T,C,V,A,S,VT,AC

in to the user interface under [notifications_centre.user_messages_grid] and see what happens.

Jim.

8

Re: Notifications question

Oh Jim, I'm sorry! I have wasted your time but in saying that, I couldn't have got it working without your help.

You triggered the golden rule in my head which I had forgotten - always make sure your code is up to date!!

I had a look on the wiki and saw that there was a very recent update to the notifications code - http://code.google.com/p/indicia/source … amp;r=7676 and I have now applied that and the associated .js update.

With your pointer about the @sourceType I experimented and discovered that it needs to be set to @sourceType=
(without this there is no filtering available).

I now have a working page showing all the notifications and a nice little filter option at the top.

Thank you, it was a PICNIC!!

Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar