Re: Forms 4.5 Question

From: Madhu Cherukuri <Madhu.Cherukuri_at_usa.net>
Date: 6 Nov 1998 01:35:27 GMT
Message-ID: <36425294.5D6B08A3_at_usa.net>


[Quoted] I'm not sure if this has to do some thing with the properties of the display item.

You can still use the new-item-instance trigger with code like this

Begin

   select text into :BLOCK.STATUSTEXT
  from TEXT
  where your_condition;

  exception
   when no_data_found then

        code to handle when there is no data    when too_many_rows then

        code to handle when there are more than one row End;

This should work. If it is not working,
then check for display properties of the item. Also, check the secure property. set it to false.

You can also debug by putting some message command after you fetch the text into the field like this.

message(:BLOCK.STATUSTEXT); pause

This will display the value of the text. put this code after the code as i had mentioned above.

This will tell you whether the text is assigned to the display item or not

Good luck

Madhu Cherukuri

"Liptay, Albert" 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.
Received on Fri Nov 06 1998 - 02:35:27 CET

Original text of this message