It can be handy to generate an active filtering link in a dataset. For example, we use a URL property to turn the values in the species column into links to a filtered subset of the data. When you click one species value, you get a grid showing only subjects of the same species. Another way to use a URL property in a list is to link to an outside file.

Create Links to Filtered Results

  • Click the Start Page tab.
  • From the Lists web part, click NIMHDemographics to open the grid view of the list.
  • Click the column header Species, then Filter.
  • Click the label Rat to select only that single value.
  • Click OK.
  • Notice the URL in your browser, which might look something like this - full path will vary, but the filter you applied is encoded at the end. This will show only rows where the species is Rat.
  • Click Design.
  • Click Edit Design.
  • Select the Species field by clicking in its Name box.
  • On the Display tab in the field properties box, enter this value for the URL field:
/list/grid.view?name=NIMHDemographics&query.Species~eq=${Species}
  • The filter portion of this URL replaces "Rat" with the substitution string "${Species}". (If we were to specify "Rat", clicking any species link in the list would filter the list to only show the rats!)
  • Scroll up and click Save.
  • Click Done.
  • Clear the filter by hovering over Filter: (Species = Rat) and then clicking Clear All.
  • Click Field mouse and you will see the demographics list filtered to display only rows for field mice.

Create Links to Files

A column value can also include link to a file. All the values in a column could link to a fixed file (such as to a protocol document) or you can make row-specific links to files where a portion of the filename matches a value in the row such as the Subject ID in this example. Open this link in a new browser window:

Edit the URL, incrementing the file name 20023.png, 20024.png, 20025.png. These are simply cartoon images of our sample characters stored on a public server, but in actual use you might have slide images or other files of interest stored on your local machine and named by subjectId.

Here is a generalized version, using substitution syntax for the URL property, that you can use in the list design:

This generalized version is already included in the list design in our example archive.

  • Click Start Page, then click the NIMHDemographics list in the Lists web part.
  • Click Design.
  • Click Edit Design.
  • Select the CartoonAvailable field by clicking its Name box.
  • Notice the URL property for this field. It is the generalized version of the link above.
  • Click Cancel and return to the grid for this list.
  • Observe that clicking true in the CartoonAvailable column opens an image of the 'subject' in that row.

Related Topics

Previous Step

discussion

Discussion

Search 

Pages 

previousnext
 
expand all collapse all