PhenixID

String Padding

Version: 1.2

Category: Process

Extended Category: String

Action Package: Standard Actions

Description

Padding is used to make sure that the string value in a Session Attribute has a certain number of characters. If the original value is less than the desired number of characters, a chosen character will be added to the start of the string value. If the original value is greater than the desired number of characters, no change will occur.

ParameterDescriptionExample
Session Attribute(s)[Mandatory]
Enter one or more session attribute names which values will be padded. Multiple session attribute names are separated with a comma.
Default value is empty.
id
Character for padding[Optional]
The character that is used for padding. For space, type SPACE.
Default value is 0 (zero).
Total number of characters[Mandatory]
The desired number of characters in the Session Attribute value. If the value is less than this, the right amount of padding characters will be added to the beginning or end of the value.
No default value.
10
Add padding at beginning (true/false)[Optional]
If the padding character should be added to the beginning of the value (true), or to the end of the value (false).
Default value is true.
false
Session Attribute for Status[Optional]
Enter a session attribute name for ‘Status’. The ‘Status’ attribute value indicates SUCCESS or ERROR.
Default value is empty.
paddingStatus

Use Cases

Example 1: Add zeros to number

Make sure the attribute number always contains four characters, with leading zeros.

ParameterExample
Session Attribute(s)number
Character for padding0
Total number of characters4
Add padding at beginning (true/false)true
Session Attribute for StatuspaddingStatus

DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.

PhenixID - support.phenixid.se