Re: Forms 4.5 item properties

From: Steve Cosner <stevec_at_zimmer.CSUFresno.EDU>
Date: 1995/10/30
Message-ID: <DH9sLq.23L_at_CSUFresno.EDU>#1/1


It is not simple, but this should work:

Set up your column as char, not number.
In a post-query trigger or some other appropriate one: re-format the

   value in the column. If you want the percent, use

               substr(to_char(percent_value,'999990.00')||'%',-6)    If you want the dollar value:,

               substr(to_char(dollar_value,'L99990.00')||' ',-6)

I'm not sure on the exact syntax, or quite how the currency symbol "floats" before the numeric digits, but something like the above should work.

Also, you may need a hidden column--one to hold the actual numeric value, and then the one to display the currency/percent.

Good luck
Steve Cosner

In article <46oo73$eoe_at_news.corpcomm.net> kasten_at_brookings.net (Chris Kasten) writes:
>
>For the sake of discussion, let's suppose you have a form with
>a block displaying 10 rows of data. One of the columns in the
>block is a NUMBER datatype.
>
>AAA AAA 000.00
>BBB AAA 000.00
>CCC BBB 000.00
>DDD BBB 000.00
>
>
>Now let's further suppose that you would like to change the
>format of that field dependant upon some other values
>in that row. For example, in the block layed out above
>you would like the number to be a percentage whenever
>column 2 is 'AAA', and a dollar format when column 2 is
>'BBB'.
>
>AAA AAA 00.00%
>BBB AAA 00.00%
>CCC BBB $00.00
>DDD BBB $00.00
>
>I know I can change the format_mask on the fly via
>the set_item_property() function, but can I do it
>individually (and conditionally)? Currently when calling
> set_item_property(id, format_mask, '999.00%')
>all of the fields become formatted to percent - as
>expected. What I want to know is can I get around
>that (short of using temporary display fields of some sort)?
>
>
>Chris
>--
>Chris Kasten
>Programmer/Analyst (among others...)
>
>#include <sys/std_disclaimer.h>
  Received on Mon Oct 30 1995 - 00:00:00 CET

Original text of this message