Re: Forms 4.5 item properties
Date: 1995/11/05
Message-ID: <47jeod$68e_at_merlin.resmel.bhp.com.au>#1/1
In article <46qp9a$qcd_at_news.corpcomm.net>, kasten_at_brookings.net (Chris Kasten) says:
>
>rajsethi_at_ix.netcom.com (Rajeev Sethi ) wrote:
>
>> In <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)?
>> >
>> >
>
>
>> Hi,
>> Trying setting the item property in POST-QUERY trigger.
>
>No dice - the whole column ends up being the format appropriate
>to the last row fetched. If the last row is supposed to be formatted
>as currency I end up with:
>
>AAA AAA $00.00
>BBB AAA $00.00
>CCC BBB $00.00
>DDD BBB $00.00
>
>Even though those top two rows should be percents (as shown in
>an above example).
>
>Please understand - this is expected behaviour, I'm just trying to
>find a way around it.
>
>Any other ideas?
>
>Chris
>--
>Chris Kasten
>Programmer/Analyst (among others...)
>
>#include <sys/std_disclaimer.h>
>
How about having multiple items for this fnal item,
non-base table items of course, and have them all displayed
at the same position. Have as many items as you have required formats.
Then in the post-query you Go_Item to the appropriate format,
so that the required format is displayed.
Might be able to make use of Mirror Item property, otherwise code the assignment by hand.
Sound feasible?
Lee
/\/\ : Lee Levy, ISSD Systems Development / / /\ : BHP Information Technology (WOLLONGONG REGION) / / / \ : PO Box 261, Warrawong, NSW 2502, Australia / / / /\ \ : ACN 006 476 213 \ \/ / / / : Telephone: +61 42 75-5485 (tie-line 8855-) \ / / / : Facsimile: +61 42 75-5500 \/\/\/ : Internet : Levy.lee.ls_at_itwol.bhp.com.au : WWW : http://issdnt.itwol.bhp.com.au/lee.htm ====================================================================Opinions expressed are my own and not necessarily those of either my employer or their clients Received on Sun Nov 05 1995 - 00:00:00 CET