File Loaded Drop Box "None" Record 
Author Message
 File Loaded Drop Box "None" Record

Hi I'm trying to create a none record for a file loaded drop box by adding
to the queue.  It's actually a web app, but I tested it in Windows and it
does the same thing.  With this, a user could select a value in the drop
box that clears the value.  What is the best way to accomplish this?  I've
tried adding to the que AFTER the ResetQueue embed, but have had little
success.  I'm using the following code:

  GET(FDB9.Q,1)
  IF  FDB9.Q.REN:DESCRIPTION <> '[none]'
      FDB9.Q.REN:RA_CODE      = 'AA'
      FDB9.Q.REN:DESCRIPTION  = '[none]'
      ADD(FDB9.Q,1)
  END

The drop box looks the way I want it to and the values are set correctly
for every record besides the [none].  When [none] is selected, it is set to
the next value in the queue, probably because the record doesn't exist in
the file.  On an update and returning to the screen, the record immediately
above the proper record is selected, rather than the correct one.  Could
someone help me out here and tell me how to get around this?  Do I have to
reconstruct the entire queue?

Your response is much appreciated,
Alan McMillan



Sun, 07 Dec 2003 00:22:50 GMT  
 File Loaded Drop Box "None" Record
Try get(Q, choice(Q)) before your code.


Quote:
> Hi I'm trying to create a none record for a file loaded drop box by adding
> to the queue.  It's actually a web app, but I tested it in Windows and it
> does the same thing.  With this, a user could select a value in the drop
> box that clears the value.  What is the best way to accomplish this?  I've
> tried adding to the que AFTER the ResetQueue embed, but have had little
> success.  I'm using the following code:

>   GET(FDB9.Q,1)
>   IF  FDB9.Q.REN:DESCRIPTION <> '[none]'
>       FDB9.Q.REN:RA_CODE      = 'AA'
>       FDB9.Q.REN:DESCRIPTION  = '[none]'
>       ADD(FDB9.Q,1)
>   END

> The drop box looks the way I want it to and the values are set correctly
> for every record besides the [none].  When [none] is selected, it is set
to
> the next value in the queue, probably because the record doesn't exist in
> the file.  On an update and returning to the screen, the record
immediately
> above the proper record is selected, rather than the correct one.  Could
> someone help me out here and tell me how to get around this?  Do I have to
> reconstruct the entire queue?

> Your response is much appreciated,
> Alan McMillan



Sun, 07 Dec 2003 09:32:40 GMT  
 File Loaded Drop Box "None" Record
Hi Alan,

    Sometime when I have to include a "fixed" option in a list of user
defined options.  (In your case the fixed option would be [NONE].)  I add
the fixed option into the file that contains all the user defined options.
Since the "[NONE]" is an actual record in the file, there is no need to
modify the file loaded dropdown code.  And, if you use angle brackets
instead of square brackets, it will be placed as the first item (in ASCII)
on an alphabetical list.  One drawback is that this special record need to
be filtered out when running reports that uses this list of options.

    Just another idea.

Edward Loh


Quote:
> Hi I'm trying to create a none record for a file loaded drop box by adding
> to the queue.  It's actually a web app, but I tested it in Windows and it
> does the same thing.  With this, a user could select a value in the drop
> box that clears the value.  What is the best way to accomplish this?  I've
> tried adding to the que AFTER the ResetQueue embed, but have had little
> success.  I'm using the following code:

>   GET(FDB9.Q,1)
>   IF  FDB9.Q.REN:DESCRIPTION <> '[none]'
>       FDB9.Q.REN:RA_CODE      = 'AA'
>       FDB9.Q.REN:DESCRIPTION  = '[none]'
>       ADD(FDB9.Q,1)
>   END

> The drop box looks the way I want it to and the values are set correctly
> for every record besides the [none].  When [none] is selected, it is set
to
> the next value in the queue, probably because the record doesn't exist in
> the file.  On an update and returning to the screen, the record
immediately
> above the proper record is selected, rather than the correct one.  Could
> someone help me out here and tell me how to get around this?  Do I have to
> reconstruct the entire queue?

> Your response is much appreciated,
> Alan McMillan



Sun, 07 Dec 2003 14:13:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. AddOn for Blank record in File Loaded Drop Box

2. file drop value disappears on "change"

3. couldn't load file "example.dll": invalid argument

4. File-loaded drop box

5. File Loaded Drop Box error message

6. File loaded drop boxes

7. File loaded drop box

8. File Loaded Drop Box & Locator

9. File Loaded Drop Box- multi columns

10. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

11. problem when type is "NONE"

12. What is "None" in C module

 

 
Powered by phpBB® Forum Software