SetUserString Method (name, value, createIfNecessary)

Pageflex Document Action API

Pageflex Document Action API SetUserString Method (name, value, createIfNecessary)
Namespaces > Pageflex.Scripting > Application > SetUserString(String, String, Boolean)
Sets the value of a user string for the current online editing session.
Syntax
C# Visual Basic Managed C++
public static void SetUserString (
	string name,
	string value,
	bool createIfNecessary
)
Public Shared Sub SetUserString ( _
	name As String, _
	value As String, _
	createIfNecessary As Boolean _
)
public:
static void SetUserString (
	String^ name, 
	String^ value, 
	bool createIfNecessary
)
Parameters
name (String)
The name of the user string being set. Do not prefix this name with the ^ character.
value (String)
The value to assign.
createIfNecessary (Boolean)
If trueTruetrue and the specified user string does not exist, a new user string will be created. If falseFalsefalse and the specified user string does not exist, a UserStringNotFoundException is raised. Use falseFalsefalse when the user string has already been created to protect against misspelling the name.
Remarks
If no user string is currently defined with the given name, a new user string is created.
Exceptions
Exception Condition
UserStringNotFoundException No user string named name is defined in the current online editing session.
WrongApplicationContextException The current Context is not an online editing session.
ArgumentNullException The value supplied for name or value was nullNothingnullptr.

Assembly: PFScript Version: 8.0.7.1407 (Module: PFScript)