Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
General Reference
Reference
View Schema
M-S
 SetList Element

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
SetList Element (View)

Designates which list is current.

<SetList
  Name = "Text"
  PreserveContext = "TRUE" | "FALSE"
  Scope = "Request">
</SetList>
Attribute Description

Name

Required Text. Specifies the name of the list.

PreserveContext

Optional Boolean. If FALSE, implementing the SetList element reruns the database query that is necessary to fetch the data for a form that displays a single list item. This functionality is useful when a view and a form are on the same page. The default value is TRUE.

Scope

When set to Request, this attribute makes the list globally available to the page.

None

Minimum: 0

Maximum: 1

When you use the SetList element, you need to use the internal name, which has no spaces and is invariant.

The SetList element has both a spanning and a nonspanning form, so that <SetList>Announcements</SetList> would be the same as <SetList Name="Announcements"/>.

The SetList element is often a child to a Method element used in batch processing of requests.

The following example returns the value of the Title field from the Lists table in the database if the current list equals the list that is looked up. Initially, the current list is temporarily assigned to a variable, Old, and then reinstated as the current list.

Xml
<SetVar Scope="Request" Name="Old">
   <List/>
</SetVar>
<SetList>
   <GetVar Name="Lookup"/>
</SetList>
<IfEqual>
   <Expr1>
      <List/>
   </Expr1>
   <Expr2>
      <GetVar Name="Lookup"/>
   </Expr2>
   <Then>
      <ListProperty HTMLEncode="TRUE" Select="Title"/>
   </Then>
</IfEqual>
<SetList><GetVar Name="Old"/></SetList>

Other Resources

List Element (List)

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker