-
Notifications
You must be signed in to change notification settings - Fork 76
}bedrock.server.util.string.validate
lotsaram edited this page Apr 18, 2019
·
3 revisions
This process will validate a string pInputString
based on rules in pChanges
and change or eliminate characters to create a global variable sOutputString that can be used in the source TI.
Note:
-
pInputString
: This is the input string that needs to be validated based on file system limitations or undesirable 1st characters. -
pUndesirableFileSystem
: These are characters considered undesirable (even forbidden) in object/element names due to file system limitations of the operation system. -
pUndesirable1st
: These are characters considered undesirable as 1st characters in object/element names due to TM1 limitations. -
pChanges
: This string defines the rule of how to change undesirable characters. It can be made up of many definitions delimited bypDelim
(e.g.&
which is not considered undesirable anywhere). Each definition would contain a character considered undesirable and the desired character separatedbypSeperator
(e.g. to change a%
to Percentage and"
to inches, it would be%,Percentage&",inches
ifpDelim
=&
andpSeperator
=,
). -
pReplaceIfNotFound
: This is a catch all for characters listed inpUndesirableFileSystem
orpUndesirable1st
that don't have a rule inpChanges
. -
pDelim
: This is a character that is used to seperate definitions inpChanges
. -
pSeperator
: This is a character used to seperate the current and desired character within each definition inpChanges
. -
pMode
: This can be used to limit whether the TI looks atpUndesirableFileSystem
orpUndesirable1st
without having to delete the characters in those parameters.
Parameter | Data Type | Default | Prompt Text |
---|---|---|---|
pLogOutput |
Numeric | 1 |
Optional: write parameters and action summary to server message log (Boolean True = 1) |
pInputString |
String | Required: Element name to validate and update if necessary | |
pUndesirableFileSystem |
String | /|\>"<:?* |
Optional: Undesirable characters for file system (e.g. /|>"<:?* ) |
pUndesirable1st |
String | '+-[]@!{}% |
Optional: Undesirable 1st characters (e.g. '+-[]@!{}% ) |
pChanges |
String | \,B Slash&/,F Slash&|, &-,Minus&+,Plus&>,greater than&<,less than |
Optional: String showing what to change. Replaces with pReplaceIfNotFound if blank. |
pReplaceIfNotFound |
String | _ |
Optional: Replace ndesirable character with this if not specified in pChanges above (blank will delete) |
pDelim |
String | & |
Required: Delimiter between definitions |
pSeperator |
String | , |
Required: Seperator between current & desired |
pMode |
Numeric | 3 |
Required: 1=Validate for File System only, 2=Validate for 1st only, 3=Validate Fully |
Process doesn't call any dependencies.
test sidebar