check if a parameter value is numeric
-
- Posts: 124
- Joined: Wed Nov 26, 2014 8:32 pm
- OLAP Product: IBM TM1, Planning Analytics
- Version: PA 2.0.5
- Excel Version: 2016
check if a parameter value is numeric
Pass a cell value from excel to tm1 ti process.
User can enter any value and submit an action button , in ti ,I have to check if the passed value is numeric .
Is there a function in tm1 which can check if the parameter value is numeric.
Thanks,
User can enter any value and submit an action button , in ti ,I have to check if the passed value is numeric .
Is there a function in tm1 which can check if the parameter value is numeric.
Thanks,
-
- MVP
- Posts: 2832
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: check if a parameter value is numeric
Not if you apply data validation in Excel.
- macsir
- MVP
- Posts: 785
- Joined: Wed May 30, 2012 6:50 am
- OLAP Product: TM1
- Version: PAL 2.0.9
- Excel Version: Office 365
- Contact:
Re: check if a parameter value is numeric
Better than nothing
Code: Select all
SCAN( SUBST( vsVar, 1, 1 ), '0123456789' ) <> 0
-
- Posts: 9
- Joined: Fri May 24, 2019 1:23 am
- OLAP Product: Planning Analytics
- Version: 2.0.6
- Excel Version: Excel 2013 32-bit
Re: check if a parameter value is numeric
Set the parameter as string type first, then add checking as below:
Alex
Code: Select all
IF( vsVar @= NumberToString( NumBr ( vsVar)) );
#Is Numeric
Else;
#Not;
EndIf;
-
- Community Contributor
- Posts: 292
- Joined: Tue Sep 06, 2016 7:55 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: Excel 2010
Re: check if a parameter value is numeric
Hi,
I would think Tomok's suggestion is the way to go, but
Cant you just do the check in Excel, so have a formula along the lines of:
=IFERROR(A1*1,0)
=IF(A2=0,0,1)
Then have a parameter in the TI called pIsNumeric (1 or 0) and have the action button point at this cell?
regards,
Mark
I would think Tomok's suggestion is the way to go, but
Cant you just do the check in Excel, so have a formula along the lines of:
=IFERROR(A1*1,0)
=IF(A2=0,0,1)
Then have a parameter in the TI called pIsNumeric (1 or 0) and have the action button point at this cell?
regards,
Mark
- gtonkin
- MVP
- Posts: 1199
- Joined: Thu May 06, 2010 3:03 pm
- OLAP Product: TM1
- Version: Latest and greatest
- Excel Version: Office 365 64-bit
- Location: JHB, South Africa
- Contact:
Re: check if a parameter value is numeric
Or you could use =ISNUMBER() assuming you are not using TM1 Web.
-
- Community Contributor
- Posts: 292
- Joined: Tue Sep 06, 2016 7:55 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: Excel 2010
Re: check if a parameter value is numeric
Yes, I originally had isnumber in my comment but then thought it is probably for the web so changed it!
-
- MVP
- Posts: 351
- Joined: Wed May 14, 2008 1:37 pm
- OLAP Product: TM1
- Version: 2.5 to PA
- Excel Version: Lots
- Location: Sydney
- Contact:
Re: check if a parameter value is numeric
You still need to change it if you're on 2.0.6 or earlier.
IFERROR only got TM1Web support in 2.0.7.
IFERROR only got TM1Web support in 2.0.7.
Andy Key
-
- Community Contributor
- Posts: 292
- Joined: Tue Sep 06, 2016 7:55 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: Excel 2010
Re: check if a parameter value is numeric
Yes, and in that case just use if iserror!
regards, Mark
regards, Mark
- orlando
- Community Contributor
- Posts: 167
- Joined: Fri Aug 04, 2017 8:27 am
- OLAP Product: TM1
- Version: PAL 2.0.8
- Excel Version: Office 365
Re: check if a parameter value is numeric
here's my idea.
Why don't you store the value in a cube (eg. Value_Input) per user.
For example, the cube could have the dimensions }Client and Measure_Input.
The elements for the input are created in the dimension Measure_Input.
Instead of passing the value to the process, the user and the element from Measure_Input are passed to the process.
The process then collects the value form the cube.
This ensures that no nonsense goes to the process and you can see what exactly the user entered last.
The input cube can of course have other dimensions, it was just a quick idea.
best regards
orlando