Skip to main content

HTML for Adding Query Data

Now we add some code to the TopPicks.csp page that accesses the data in the result set opened by the TopFilms query. We use the Get method of the %Library.ResultSetOpens in a new tab class. We wrap the method call in

#( ... )#

characters, which indicate the presence of a Caché expression. When the page is generated, this expression is evaluated (in this case, the method is called) and the resulting value is added to the page.

We place this expression in the first cell of our HTML table. In this first case we retrieve the Title value.

<html> <body>
<h2><font color="#0000FF">Today's Top Picks</font></h2>
<table border=0>
<csp:query name="FilmList" classname="Cinema.Film" queryname="TopFilms">
        <td> </td>
FeedbackOpens in a new tab