How to replace all whitespaces of an attribute with a PX Policy
All Identity Manager
Policy Xpress to provide a Replace All function. Create a policy using PX -> Data -> General -> String Parser -> here you will see the Replace function.
Here is an example of the PX Policy using the Replace All function to replace all whitespace on the UserID attribute (leading, trailing, embedded) for the Create user task. In the "Sub-String to be Replaced" I entered a single whitespace and in the "Replace With" I entered nothing.
Policy Name: Replace All Space Characters In UserID - UI
Policy Type: UI
Event State: Submission
Event Name: Create User (CreateUser)
Data Element Name: get_UserID
Category: Attributes
Type: User Attribute
Function: Get
Attribute Name: User ID (%USER_ID%)
Data Element Name: nospaces_UserID
Category: General
Type: String Parser
Function: Replace All
Original String: {'get_UserID'}
Sub-String to be Replaced:
Replace With:
Action Name: set_UserID
Category: Attributes
Type: Set User Values
Function: Set
Attribute Name: User ID (%USER_ID%)
Value: {'nospaces_UserID'}