Product:
Planning Analytic 2.1.19 tm1server = 11.8.03500.6
Microsoft Windows 2019 server
Issue:
How use SUBST instead of STR function in a process?
In PAL 2.1.18 STR function does not truncate a string when a length parameter is passed. The original value is returned as a string.
Solution:
This should give the same result
sTestA = STR(1000000, 4, 0) ;
sTestB = SUBST (numbertostring (1000000) , 1, 4) ;
Syntax for SUBST is:
SubSt(String, Beginning, Length)
- String = A text string
- Beginning = Substring starting position
- Length = Length of the string that we want to keep
More Information:
- AsciiDelete: Deletes an ASCII file
- AsciiOutputOpen: Appends or overwrites content in a specified existing file that you would use in conjunction with functions that write to a file like AsciiOutput and TextOutput.
- AsciiOutput: writes data to a file to a directory the TM1 Server can access, using data sources from a cube, an ODBC source or no data sources.
- CapIt = capitalises the first letter of every word in a string
- Char = Converts the ASCII numeric code into the character
- Code = Converts the character to the ASCII numeric code
- CodeW = Returns the UTF-8 numeric code for a specified character within a string
- DatasourceAsciiDecimalSeperator: Sets the decimal separator
- DatasourceAsciiDelimiter: Sets the delimiter
- DatasourceASCIIHeaderRecords: sets the header records for a text file.
- DatasourceAsciiQuoteCharacter: Sets the quote character
- DatasourceASCIIThousandSeparator: sets the thousand separator for a text file.
- DatasourceCubeview: sets the cube view in the data source.
- DatasourceDimensionSubset: sets the dimension subset in the data source.
- DatasourceNameForClient: sets the name of the data source from the client’s perspective when creating or editing the process.
- DatasourceNameForServer: sets the name of the data source.
- DatasourcePassword: sets the password used for the data source
- DatasourceQuery: sets query for the data source
- DatasourceType: sets the type used for the data source
- DatasourceUsername: sets the name used to connect to the data source
- DatasourceODBOCatalog: sets the name of the ODBO database collection that you want to connect.
- DatasourceODBOConnectionString: sets the connection parameters required to connect to the OLAP server.
- DatasourceODBOCubeName: sets the cube name you want to connect to from the OLAP Server.
- DatasourceODBOHierarchyName: This function is used for OLAP products like SAP BW and sets the name of the hierarchy from a dimension.
- DatasourceODBOLocation: sets the name of the OLAP server’s location.
- DatasourceODBOProvider: sets the name of the ODBO provider installed on your server.
- DatasourceODBOSAPClientID: sets the client ID that connects to the SAP Server.
- DatasourceODBOSAPClientLanguage: sets the language specification from the SAP Server.
- Delet = Deletes a specified number of characters from a specified position within a string
- Fill = Repeats a string to the specified number of lengths
- Insrt = Inserts one string into another string at the given position number
- Long = Returns the length of the string
- Lower = converts text characters to lowercase
- NumberToString: convert a number to a string
- NumberToStringEx: Convert a numeric value into a string based on a specific numeric format string
- Numbr = Converts string character to a number
- Scan = Searches the specified substring within a string and returns the starting position of the substring
- SetInputCharacterSet: Specify the encoding used in the data source.
- SetOutputCharacterSet: specifies the character set when writing to a text file using TextOutput.
- SetOutputEscapeDoubleQuote: Retains or removes double quotes when outputting element names or data values to a text file
- Str = Converts number to a string character
- SubSt = Returns the substring of a specified string
- TextOutput: Writes and generates a text file in the specified path
- Trim = Removes any leading and trailing spaces from a string
- Upper = Converts text characters to upper case
- ViewExtractFilterByTitlesSet: Skip or include elements in the title axis when exporting a view using ASCIIOutput.
- ViewExtractSkipCalcsSet: Skip or include consolidated values when exporting a view using ASCIIOutput.
- ViewExtractSkipConsolidatedStringsSet: Skip or include strings on consolidated values when exporting a view using ASCIIOutput.
- ViewExtractSkipRuleValuesSet: Skip or include ruled values when exporting a view using ASCIIOutput.
- ViewExtractSkipZeroesSet: Skip or include zeros when exporting a view using ASCIIOutput.
