Dynamic Plugin Variable Example
The following example reads the values of office locations from a text file using a dynamic plugin variable.
- A list of departments is stored in a text file c:\data\departments.txt
- The XIA Service Account has access to the file c:\data\departments.txt
- The following using statement is added to the code
- The following code is used to read the contents of the departments.txt file and add them to the Values collection.
/// This is a dynamic variable plugin that provides options that the user may select from.
public class DynamicVariablePlugin : DynamicPluginVariableBase
/// Enter the custom code within the execute method.
/// The values displayed to the user are stored in the "Values" property.
public override void Execute()
string departments = File.ReadAllLines(@"c:\data\departments.txt");
foreach (string department in departments)
- The output can be tested on the Simulation Tab.