I was looking at the comments on my post about String Essbase CDF functions and found an odd request there.
I couldn't find a reason why someone would try doing that. However I ending up creating 4 functions to perform the request!!!
The request was to create a String to Number function.
Let's say that you want to convert some of your metadata to data in Essbase, there is no function that exists now which can do this. (I'm not sure whether there are some CDFs out there).
Let's see how it works.
I took Sample Basic and created two members which will hold the integer and double values.
StringInteger and StringDouble
For the next two functions, you can pass the replacement character (for example product name contains "-" in it and I would like to remove it and store the numbers)
StringDoublewReplace and StringIntegerwReplace members were added to hold these numbers.
You can register the function using the below given MaxL statements.