home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / oracle / 2550 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  3.5 KB

  1. Path: sparky!uunet!hayes!fgreene
  2. From: fgreene@hayes.com
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Forms 3.0 - How do YOU do this?
  5. Message-ID: <6557.2b30448d@hayes.com>
  6. Date: 17 Dec 92 09:12:45 EDT
  7. References: <1992Dec10.140524.1@ocvaxc.cc.oberlin.edu> <1gnffmINN138@usenet.INS.CWRU.Edu>
  8. Organization: Hayes Microcomputer Products, Norcross, GA
  9. Lines: 82
  10.  
  11. In article <1gnffmINN138@usenet.INS.CWRU.Edu>, cc312@cleveland.Freenet.Edu (Jennifer R. Amon) writes:
  12. > In a previous article, bamon@ocvaxc.cc.oberlin.edu (ME) says:
  13. >>I'm once again faced with a forms change which is always a pain:
  14. >>
  15. >>Project : The users should not be able to modify (without some special
  16. >>          action on their part) field_b in block_1 when field_a is
  17. >>          non-null.
  18. >>
  19. >>This boils down to "don't let them do it by default, but give them a way
  20. >>around the default."
  21. >>
  22. >>In the past, I've set some global when they attempt to make the change, and
  23. >>then I reset it to something else if they press commit in response to a
  24. >>"do you really want to do this?" prompt. Then I reset it again after the
  25. >>commit.
  26. >>
  27. >>It works, but it's always a real trick keeping track of and properly
  28. >>resetting the global variable.
  29. >>
  30. >>Does anybody have a better way to do this?
  31. >>
  32. > _____________________________________________________________________
  33. > -- 
  34. > Jennifer R. Amon       FREENET: aa1190@freenet.lorain.oberlin.edu
  35. > Analyst/Programmer     FREENET: cc312@cleveland.freenet.edu
  36. > Oberlin College       INTERNET: bamon@ocvaxc.cc.oberlin.edu
  37. > Oberlin, OH 44074       BITNET: bamon@ocvaxc.bitnet
  38. As I understand the problem, there are a total of five fields involved:
  39.  
  40.     FIELD1    the (possibly) null field under test
  41.  
  42.     FIELD2     the field you are LEAVING when the test occurs
  43.  
  44.     FIELD3    the actual field under test.  i.e., If FIELD1 is null then
  45.         enter this field -- If FIELD1 is not null and user says yes
  46.         then update this field
  47.  
  48.     FIELD4    the alternate field to enter if FIELD1 is not null and
  49.         user says no
  50.  
  51.     FIELD5    a test point to use to check the users response
  52.  
  53. Also, these conditions can occur from various combinations of these fields,
  54. so:
  55.  
  56.     Attach a KEY-NXTFLD to FIELD2 that contains the following:
  57.  
  58.             if :field1 is null then 
  59.                GO_FIELD('field3');
  60.             else 
  61.                 :global.path1 := 'field3';
  62.                 :global.path2 := 'field4';
  63.                 go_field('field5');
  64.             end if;
  65.  
  66.     FIELD5 is in a pop-up window with appropriate text to prompt 
  67.     the user for a Y or N response.  Attach a KEY-NXTFLD trigger 
  68.     to FIELD5 that says:
  69.  
  70.             if :field5 = 'Y' then
  71.                go_field(name_in('global.path1'));
  72.             elsif :field5 = 'N' then
  73.                go_field(name_in('global.path2'));
  74.         else
  75.            message('*** ERROR - response must be Y or N');
  76.            bell;
  77.                raise form_trigger_failure;
  78.             end if;
  79.  
  80. Hope this helps.
  81.  
  82.   ---------------------------------------------------------------------------
  83.   |      Frank Greene                  |          //////  //////             |
  84.   |      DELPHI SYSTEMS, Inc.          |           ////    ////              |
  85.   |      Telephone [615] 458-6032      |          ////    ////  //////       |
  86.   |      324 Ootsima Way               |         ////    ////    ////        |
  87.   |      Loudon, TN 37774              |        //////  //////  //////       |
  88.   ----------------------------------------------------------------------------
  89.   |         Of course, any opinions or suggestions are strictly my own       |
  90.   ----------------------------------------------------------------------------
  91.  
  92.