IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#30693 - 01/27/10 03:38 AM displayed only if it's numeric
ajmpereira Offline
OL Newbie

Registered: 11/19/09
Posts: 6
Loc: Portugal
I have a situation where I need to get certain

Top
#30694 - 01/27/10 10:14 AM Re: displayed only if it's numeric
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
ajmpereira,

There is a function called isnumber that will return true if the string is actually a number. For example, if you put this in a PressTalk:

Code:
if(isnumber('3.1416'))
  show('This is a number.')
else()
  show('NOT A NUMBER')
endif()
It will display 'This is a number.'.

You could also use it as an object's condition. For example, putting this in an object's condition:

=isnumber(@(1,1,10))

Would make the object show up only if the text on line 1 between columns 1 and 10 would be a number.

Hope that helps!

Regards,
Rapha

Top