Helper.DynamicStringForCondition Method
Produces a string from the input string based on a workflow context.
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Public Shared Function DynamicStringForCondition ( _
context As WorkflowContext, _
activity As Activity, _
str As String, _
ParamArray parameters As Object() _
) As String
'Usage
Dim context As WorkflowContext
Dim activity As Activity
Dim str As String
Dim parameters As Object()
Dim returnValue As String
returnValue = Helper.DynamicStringForCondition(context, _
activity, str, parameters)
public static string DynamicStringForCondition(
WorkflowContext context,
Activity activity,
string str,
params Object[] parameters
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextA workflow context object that contains properties that are associated with the workflow instance.
activity
Type: System.Workflow.ComponentModel.ActivityA workflow activity associated with the workflow instance.
str
Type: System.StringThe input string.
parameters
Type: []An array that contains parameters in the order that they appear in str.
Return Value
Type: System.String
A dynamic string for the condition.
Remarks
The variables in the input string are of the format “[%var%]”, but the value of var is not important. This method replaces each variable it encounters with the value in that index position in parameters. For example, if the parameter list is “2”, “4” and the input string is “This has [%x%] dogs”, the returned string would be “This has 2 dogs”.