ListControl (iWeb)

The ListControl.ascx for iWeb is similar to the ListControl control in eWeb, which, in turn, is like a more advanced version of the List content type in eWeb Web Page Details. This control is available beginning in the 2006.02 build of netFORUM.

This control is referenced on a Profile Detail and then can be placed on Profile Forms and Overview pages in netFORUM iWeb.

Case Study - Overview Page

ListControl (iWeb) is most commonly used on Overview pages of netFORUM to show, for example, recently used or added records. On the Events Overview page, for example, an Event Calendar is displayed using this control. See the Toolkit Training exercise ListControl (iWeb) for an example.

Case Study - Designed List Menu

The ListControl (iWeb) can be used on a Designed List Menu as a popup form. One limitation, however, is that values cannot be parsed in the SQL clause. This means that you cannot create a Designed List Menu that shows more information about the particular record you are on. This ability may be added in the future.

Case Study - Profile Page

Q. Is there a way to create a control that is populated from an sql statement? So what I would like to do is put a label on the form. When the form is called, some sql will run and the values returned from that SQL will populate the label. I didn't see any mention of being able to do that on the wiki page. Would it be possible to do that?

A. If the form is a Profile Form, then there is a way to do this with the ListControl.ascx.

Here is what this might look like. The panel on the right with the text "av_MFleishauer" is populated from SQL.

Profile page

Steps

First, add a new Profile Detail of content typeControl (.ascx) and make the row be 1 (same as the "detail" form) and the column be 2 (so it will appear to the right of your "detail" form).

ListControl11.jpg

After you save, edit the profile detail, click the "advanced" button and type in the SQL you want between {BeginListSQL} and EndListSQL} tags. You can use parsed values here, for example, to refer to the record that you are on.

Output the data you want (based on columns returned from the SQL statement) between the {BeginListDetail and {EndListDetail} tags.

ListControl12.jpg
ListControl13.jpg

This template here is an example. Observe the "width" and "height" on line 3 below; this sizes the control relative to the "detail" form on the left. The "height" should be the same as the "height" of the "detail" form, and the "width" should be wide enough to fit the whole form in the available space.

                
  1. {BeginListSQL}select x01_add_user from client_av_tv_network where x01_key = {x01_key}{EndListSQL}
  2. <DIV class=CRMQueries style="PADDING-TOP: 5px">
  3. <TABLE class=Dataformdivdefault height=200 width=125>
  4. <TBODY>
  5. <TR>
  6. <TD class=OverviewSubHeader>More Info</TD></TR>{BeginListDetail}
  7. <TR>
  8. <TD class=ProfileOverviewRow>{x01_add_user}</TD></TR>{EndListDetail}
  9. <TR>
  10. <TD> &nbsp; </TD></TR></TBODY></TABLE></DIV>

Limitations

  • This can be done only on a Profile Form, not on a data entry page.
  • If you want to put this on a baseline form, you must do a Substitute Form on the main form's "detail" form to narrow it to make room for your profile detail. Alternately, you can leave the main detail form alone, and make a short and wide profile detail that fits under the main detail form. This is better from an Upgrade perspective, but it will consequently push the tabs and child forms lower down the page which means users will have less room to view child forms, and need to scroll more.

See Also