Re: Forms 5 programming

From: Leo Van Nieuwenhuyse <leo.van.nieuwenhuyse_at_pandora.be>
Date: Tue, 6 Jul 1999 23:59:46 +0200
Message-ID: <h%ug3.3351$d8.5287_at_afrodite.telenet-ops.be>


You can make a (eventualy stored function) :

   function IS_NUMBER (test_string IN VARCHAR2)    RETURN BOOLEAN
   IS

      test_value NUMBER;
   BEGIN

      test_value := TO_NUMBER (NVL(test_string,'0'));
      RETURN TRUE;

   EXCEPTION
   WHEN OTHERS
   THEN
      RETURN FALSE;
   END IS_NUMBER; afterwards you can test it with IF IS_NUMBER(:block.textitem) THEN ....;

wozi <wozi_at_dhc.net> schreef in berichtnieuws CD9468B3B598AE08.96307C43D7BAB287.71FF10DC592FD347_at_lp.airnews.net...
> I have the following on a form:
> 1 text item
> 1 display item
> 1 pushbutton
>
> In the text item, users will type in either lastname or customer ID
> JAMES
> 0120456
>
> If the user clicks on the pushbutton, I want the display item to indicate
> whether
> the data that was type in the text item is a name or a 'number'.
> If it is a 'number', I am going to eventually convert it to a number and
do
> a search with it.
>
> I am wondering what the function is for ascii code. Example, if the first
> character type in a text item starts with any letter (Aa - Zz) or if it
> starts with a number (0 -9)
>
> thanks for your support
> wozi_at_dhc.net
>
>
>
Received on Tue Jul 06 1999 - 23:59:46 CEST

Original text of this message