Favourites in anonymous WebDrawer

Overview

A common usage of WebDrawer is to allow anonymous access to part or all of an RM dataset.  How then to allow a user mark records as favourites?  One way is to store a list of record uris in the browser local storage.

This sample injects a star icon into the search results and allows you to display and print a list of all your favourite records.

Video

 

Code

The code is here, if you are using RM 83 use this code instead.

Potential Issues

URL Limits

IIS imposes limits on URL length, so if a user selects lots of records (I tested up to 70 without problem) they might get an error when loading the starred view.  This is fixed in the 83 sample by using a post rather than a get to open the starred view.

Locations

I have not explicitly excluded Locations, although they are excluded almost by accident due to the fact that Location search results only have one column.   If you display more than one column in tour Location search results you will see a star and this could confuse everything.  Some refinement of the code will be required.

Written on January 29, 2016