Page 1 of 1

Usage of variable in error message

Posted: Mon Dec 21, 2015 11:04 am
by Jesh19
Hi,

I need to use a string value in my error message.
Let me explain the scenario.

I am having a cube with only 2 dimensions.
Organization and MaxHeadCount.

I am assigning some maximum headcount to each org.
So, in the form when the user enters the headcount more than maxheadcount, i am showing a error as 'Maximum Headcount Limit has exceeded.'

Now, the requirement is like i need to show the number in error message.
Let A(org) --> 120(MaxHeadcount)
and when user tries to enter headcount more than 120. It should prompt error message like "The headcount shouldn't cross 120".
How to pull this number into error message?


Thanks & Regards,
Jeshwanth

Re: Usage of variable in error message

Posted: Mon Dec 21, 2015 11:22 am
by Wim Gielis
In what interface does this happen ?
Excel / TM1 Web ? A TI process that is calculating / validating the input ?
A TM1 (string) rule in the Cube viewer ?

Re: Usage of variable in error message

Posted: Mon Dec 21, 2015 2:40 pm
by lotsaram
So you need to convert a number to a string value.

Have you read the manual? It's all there. The intent of this forum is not to answer questions that can and should be quite easily answered wit a quick scan of the manual.

Re: Usage of variable in error message

Posted: Tue Dec 22, 2015 9:33 am
by Jesh19
I have got the solution.

Regards,
Jeshwanth

Re: Usage of variable in error message

Posted: Tue Dec 22, 2015 11:37 am
by Wim Gielis
Jesh19 wrote:I have got the solution.

Regards,
Jeshwanth
Thank you for the update. For users looking for answers rather than posting themselves, please add the solution you found.

Re: Usage of variable in error message

Posted: Wed Dec 30, 2015 9:57 am
by Jesh19
I have concatenated it with error message using CellGetS function.

For example:
My error message is 'Maximum Headcount has exceeded' and my value is some 50.
I wrote as follows:

'Maximum Headcount has exceeded' | CellGetS(Cube,dim1,dim2,value);

Regards,
Jeshwanth

Re: Usage of variable in error message

Posted: Wed Dec 30, 2015 10:08 am
by Wim Gielis
Let's add a few characters to make it somewhat more readable:

Code: Select all

'Maximum Headcount was exceeded: ' | CellGetS(Cube, dim1, dim2, value);