Reading Data Internally
In addition to input parameters, your form can have input data that is read internally; such as from a data source. This kind of data normally is received from a subscription to a Workflow service provider, and can be displayed in the form.
An existing sample form (UsersFormVB) shows a list of user names obtained from the Personnel service provider. The code for the override is as follows:
Public Overloads Overrides Sub TransferDataIn()
Try
Dim userStartup As Proficy.Platform.Core.ClientTools.ServiceDirectory.UserStartup = userStartup.[Default]
Dim personnelService As Proficy.Platform.Services.Personnel.Interfaces.IPersonnel = TryCast(userStartup.GetDefaultProvider("IPersonnel"), Proficy.Platform.Services.Personnel.Interfaces.IPersonnel)
Dim people As Proficy.Platform.Services.Personnel.DataTypes.Person() = personnelService.GetAllUsers()
_usersList = New List(Of String)()
If people IsNot Nothing Then
For Each person As Proficy.Platform.Services.Personnel.DataTypes.Person In people
_usersList.Add(person.S95Id)
Next
_usersList.Sort()
UsersListBox.Items.AddRange(_usersList.ToArray())
End If
Catch e As Exception
HeaderLabel.Text = "Error: " + e.Message
HeaderLabel.ForeColor = System.Drawing.Color.Red
End Try
End Sub