Re: Global Variable Dropping Leading Zeros

From: <webbde_at_post.queensu.ca>
Date: Tue, 15 Jun 1999 15:32:16 GMT
Message-ID: <7k5rlv$p3h$1_at_nnrp1.deja.com>


Thanks Andy

Upon further investigation I realized that as the form started up I was loading the global.deptno variable with a function that retrieved the user's department number and the function returned a NUMBER. Of course, every thing was fine and it made no difference until I hit a user with a department number like 002 or 045 and the leading zeros were dropped. I just altered the function to return a varchar2 instead. Silly me.

Dan

>
> Globals are char fields, you need to send the value you require to the
> global including the zeroes - e.g. global.deptno := '002'.
>
> E.G the following works for me on a simple push-button action.
>
> :global.value := '001';
> :block2.display_item := :global.value;
>
> Whilst this just counts up as numbers:
>
> default_value('1','global.value');
> :global.value := to_number(:global.value) + 1;
> :block2.display_item := :global.value;
>
> Is the value you are passing numeric or char?
>
> Andy
> >
> >Thanks,
> >
> >Dan Webb
> >webbde_at_post.queensu.ca
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Share what you know. Learn what you don't.
>
> --
> Andy Hardy. PGP key available on request
> ===============================================================
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Jun 15 1999 - 17:32:16 CEST

Original text of this message