Re: How do I find what was selected from a poplist?

From: Donna M. Forosisky <frisk_at_enter.net>
Date: Sat, 31 Jul 1999 14:27:15 -0400
Message-ID: <37A34003.8374FED6_at_enter.net>


Solved my problem.

It seems that the problem was really with repopulation of the item (poplist).
While deleting the old record group, creating a new one & populating the poplist showed the correct values, it left the list's "default" selection at the first non-null value.

In other words, if the user selected the first item from the drop-down and then made a change that caused the drop-down to be repopulated with different values, the new value shown by default was the first non-null value.

So, if the user wanted that value and clicked the OK button (which had a when-clicked to take the value from the poplist & assign it to another variable), the poplist didn't think the selection had changed.

I was able to fix the problem by setting the poplist item to null PRIOR to repopulating with a new record group. When in doubt, initialize! :

   :REASON_BLOCK.NAME := NULL;    populate_list('REASON_BLOCK.NAME',vReasonGroup);

  • end of code ---

Setting :REASON_BLOCK.NAME to NULL did the trick.

Thanks to the few folks who attempted to help me via email.

Donna

> "Donna M. Forosisky" wrote:
>
> I'm thinking I didn't convey my request properly so I'll try again :
>
> I've created a poplist based on a dynamic record group. When the user
> selects an item from the poplist drop-down box, I want to know what item
> they've selected.
>
> I tried this :
>
> vNewReason := :Reason.Reason_Drop_Down;
>
> Where Reason is the block and Reason_Drop_Down is the name of the item
> in the block (the poplist)
>
> and this returned the selected value the majority of the time. But if I
> went back & reselected, the value in vNewReason wouldn't always be set
> correctly.
>
> Because this isn't always working, I am thinking that I need to evaluate
> the value in another way (perhaps using the get_group_xxxx functions?)
> Is this correct?
>
> I'm using Forms 4.5, Developer 2000 1.somethingorother for Windows on a
> Win95 workstation against an Oracle 7.1.5.2.3 database.
>
> Thank you.
>
> Donna
Received on Sat Jul 31 1999 - 20:27:15 CEST

Original text of this message