Skip to main content

Managing Shared Lists

A shared list is a list of values associated with a named key. They can contain any number of values, unlike shared variables. For example, the following table describes two shared lists: CustomerId and OrderNumber:

KeyValue
CustomerId50999, 61251, 00179, 33144, 15613
OrderNumber23, 25, 26, 24, 28, 29, 32, 30, 31
note

Shared lists are ordered left to right (first to last). In the above CustomerId list, the first value is 50999 and the last value is 15613. It is important to be aware of this order when accessing the shared lists from virtual user (VU) scripts.

Importing Shared List Data

Shared List data can be imported from comma separated value (.csv) files. For more information, see Importing and Exporting Lists.

Shared List Actions

When the Shared Lists tab is open, there are a variety of actions that can be performed using the buttons on the right. Most of the actions require a shared list to be selected in the Key/Values table.

  • View: displays the Name (key), contents of the list, and length of the list in a separate window. From this window, it is possible to copy the key or values to the clipboard.
  • Add Item: displays the Add Item dialog, which can add a value to the beginning or end of the selected list using the add first or add last options.
  • New: displays the New List dialog, which creates a new shared list using the specified Key and Value.
info

The New List dialog only accepts a single value to be initially added to the list. If you enter a comma-separated list of values, you will end up with unexpected results!

  • Remove First: removes the left-most item from the selected list.
  • Remove Last: removes the right-most item from the selected list.
note

Removing the final item from a shared list will also remove the key from the Key/Values table .

  • Remove: removes the selected key and all values from the Key/Values table.

Maximum List Values to Display

The number of values (columns of values) displayed in a shared list within the Shared Lists table can be restricted.

The number of values to display can be adjusted by using the Maximum list values to display selection box at the bottom of the window.