Re: Forms 4.5 Question
Date: Thu, 05 Nov 1998 17:24:17 GMT
Message-ID: <71smff$7c9$1_at_oxygen.technet.net>
"Liptay, Albert" <aliptay_at_nortel.ca> wrote:
>Hi All,
>Well, I'm new to Forms (Developer/2000) and here is my question:
>I've got a form with a bunch of graphs in it and that is all working
>well. I want to display some text retrieved from a table and can't get
>it to work.
>I created a Display Item (from the help I'm assuming that's what I need)
>and then created a WHEN-NEW-ITEM-INSTANCE trigger to populate the item.
>Here is my code for the trigger:
>declare
> it_id Item;
> message CHAR(256);
>begin
> it_id := Find_Item('STATUSTEXT');
> select text into message from status_text;
> SET_ITEM_PROPERTY(it_id, DEFAULT_VALUE, message);
>end;
>Unfortunately this isn't working, I guess I don't know if I can use
>SET_ITEM_PROPERTY to set the value of the Display Item (in this case
>STATUSTEXT) and secondly, what the field I want to specify is.
>Any Ideas or help would be really appreciated.
>Thanks,
>Albert Liptay.
[Quoted] You're right (as far as we may trust the online-docs): you can not change the property 'DEFAULT_VALUE' during run-time. (In general, many properties can't be set run-time.)
Maybe you can achieve the same by simply setting the value of the item:
select text into :STATUSTEXT from status_text;
But: This might cause trouble if the user can go through the records of the block in which the STATUSTEXT-Item is. You might have to move the code form WHEN-NEW-FORM-INSTANCE to WHEN-NEW-RECORD-INSTANCE (Block-Level).
Hope it Helps.
Arnold Schommer
Arnold Schommer Received on Thu Nov 05 1998 - 18:24:17 CET