Helper.ProcessStringField Method
Retrieves a string that represents the value of a specified workflow variable.
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Public Shared Function ProcessStringField ( _
str As String, _
activity As Activity, _
context As WorkflowContext _
) As String
'Usage
Dim str As String
Dim activity As Activity
Dim context As WorkflowContext
Dim returnValue As String
returnValue = Helper.ProcessStringField(str, _
activity, context)
public static string ProcessStringField(
string str,
Activity activity,
WorkflowContext context
)
Parameters
str
Type: System.StringA string that contains the name of the variable whose value you are retrieving from the active workflow instance.
activity
Type: System.Workflow.ComponentModel.ActivityA workflow activity.
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextWorkflowContext object that contains properties that are associated with the active workflow instance.
Return Value
Type: System.String
The value of the specified workflow variable.
Remarks
The str field is similar to a format string. SharePoint Foundation converts the variable name that is provided into the corresponding activity.fieldName.
Examples
Str = "Dear [%titlePrefix%][%lastName%], \r\n We would like to inform you that you may have already won [%localCurrencySymbol%][%randomLargeAmount%]!"