We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

List Item Expansion Examples

The following examples illustrate the effects of list item expansion on the display of values in a field's drop-down list box.

These examples use the following values:

  • [Project]\Business Analysts is a team project group that contains three business analysts users: JayHamlin, PilarAckerman, and ReshmaPatel.

  • Example1\MyTeam is a group that contains three sub-groups: Development, Test, and Program Management. Each sub-group contains one user: devuser, testuser, pmuser, respectively. The group Example1\MyTeam also contains the user juser.

  • Example1\MyReports is a group that contains the users userone, usertwo, userthree, and one sub-group, MyRemotes, which contains the users userfour and userfive.

  • BoolValues is a global list that has two entries, true and false.

    NoteNote

    Use the literal prefix [Project] instead of using the actual name of the team project.

Example

In this example, the field contains a string value, a group, and a global list. At run time, the list is expanded and groups are filtered out.

<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
      <LISTITEM value = "string" />
      <LISTITEM value = "[Project]\Business Analysts" />
      <GLOBALLIST value = "BoolValues" />
</ALLOWEDVALUES>

The drop-down list box for the field shows these values:

string, true, false, JayHamlin, PilarAckerman, ReshmaPatel

Example

In this example, the field contains a string value, two groups, and a global list. At run time, the list is expanded and groups are not filtered out.

<ALLOWEDVALUES expanditems="true" >
      <LISTITEM value = "string" />
      <LISTITEM value = "Example1\juser2"/>
      <LISTITEM value = "Example1\MyTeam" />
      <GLOBALLIST value = "BoolValues" />
</ALLOWEDVALUES> 

The drop-down list box for the field shows these values: string, true, false, juser, juser2, devuser, testuser, pmuser, Development, Test, and Program Management.

Example

In this example, the field contains a string value, two groups, and a global list. At run time, the list is not expanded and groups are not filtered out. This means that group names are displayed, but not the users within those groups.

<ALLOWEDVALUES expanditems="false">
      <LISTITEM value = "string" />
      <LISTITEM value = "Example1\MyReports"/>
      <LISTITEM value = "Example1\MyTeam" />
      <GLOBALLIST value = "BoolValues" />
</ALLOWEDVALUES>            

The drop-down list box for the field shows these values: string, MyTeam, MyReports.

NoteNote

The global list name and contents are not displayed.  

Example

In this example, the field contains a string value, one group, and a global list. At run time, the list is expanded and groups are filtered out.

<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
      <LISTITEM value = "string" />
      <LISTITEM value = "Example\MyTeam" />
      <GLOBALLIST value = "BoolValues" />
</ALLOWEDVALUES> 

The drop-down list box for the field shows this value: string.

NoteNote

MyTeam is a group which is excluded and not expanded, and BoolValues is a global list and so neither one is expanded nor shown.

See Also

Show: