Disabling Field Lookup for a Conditionally disabled entry field 
Author Message
 Disabling Field Lookup for a Conditionally disabled entry field

What I am trying to achieve is this,
I have a form with an Choice Option field  ie Option1 and Option2 .
Option 1 is associted with Field A, and Field A has a Validation
Procedure with a Lookup button. If I select Option1, I want to ENABLE
Field A entry and it's associated lookup. At the same time I would
want to DISABLE Field B and it's Associated lookup. Field A looks up a
different file to the one referenced by Field B.

Any assistance is greatly appreciated



Fri, 01 Oct 1999 03:00:00 GMT  
 Disabling Field Lookup for a Conditionally disabled entry field

What I am trying to achieve is this,
I have a form with an Choice Option field  ie Option1 and Option2 .
Option 1 is associted with Field A, and Field A has a Validation
Procedure with a Lookup button. If I select Option1, I want to ENABLE
Field A entry and it's associated lookup. At the same time I would
want to DISABLE Field B and it's Associated lookup. Field A looks up a
different file to the one referenced by Field B.

Any assistance is greatly appreciated



Fri, 01 Oct 1999 03:00:00 GMT  
 Disabling Field Lookup for a Conditionally disabled entry field

Hi Edwin,

You need to use some code like this, in the embed for the option:
event:changing
?OptionField{Prop:touched} = True
Case Choice()
of 1 !! references option A
  ?FieldA:Field1{Prop:Disable} = False
  ?FieldA:Field2{Prop:Disable} = False
  ?FieldB:Field1{Prop:Disable} = True
  ?FieldB:Field2{Prop:Disable} = True
of 2  !! references option B
  ?FieldA:Field1{Prop:Disable} = True
  ?FieldA:Field2{Prop:Disable} = True
  ?FieldB:Field1{Prop:Disable} = False
  ?FieldB:Field2{Prop:Disable} = False
End
You will also want to put the same code in the preparing to open window
embed as well so that when a record is being changed the fields are
properly primed and enabled or disabled. A better idea is to put the
code into a routine and call the routine from both embeds.
HTH
--
Jim Katz
CTO CycleMart.com
http://www.cyclemart.com Powered By iTZcat

Using Clarion for Windows
Always looking for the simpler solution.



Sat, 02 Oct 1999 03:00:00 GMT  
 Disabling Field Lookup for a Conditionally disabled entry field

Hi Edwin,

Try embedding this code template to achieve what you are after. (Paste this
template to the end of code.tpw)



Quote:
> I have a form with an Choice Option field  ie Option1 and Option2 .
> Option 1 is associted with Field A, and Field A has a Validation
> Procedure with a Lookup button. If I select Option1, I want to ENABLE
> Field A entry and it's associated lookup. At the same time I would
> want to DISABLE Field B and it's Associated lookup. Field A looks up a
> different file to the one referenced by Field B.

Regards

--
joe van niekerk
------------------------
Topspeed Corporation
Cape Town
South Africa


Home of the MAPI \ ezHelp and CWWinReg Templates

#!--------------------------------------------------------------------------

#CODE(ConditionHideUnhideDisable,'Multi Hide\Unhide\Disable\Enable')

 #BOXED,WHERE(NOT %Condition)
  #BUTTON('List of Controls...'),MULTI(%MultiSetting,'Window Control:' &
%MultiControl & '-' & %MultiControlAction)
   #PROMPT('Control to Hide\Unhide etc:',CONTROL),%MultiControl,Req

#PROMPT('Action:',DROP('Hide|Unhide|Disable|Enable')),%MultiControlAction
   #PROMPT('Take action on Prompt
?',CHECK),%MultiControlPromptToo,DEFAULT(1)
  #ENDBUTTON
 #ENDBOXED
 #BOXED,WHERE(%Condition),AT(,12)
  #BUTTON('True List of Controls...'),MULTI(%TrueSetting,'Window Control:'
& %TrueControl & '-' & %TrueControlAction)
   #PROMPT('Control to Hide\Unhide etc:',CONTROL),%TrueControl,Req
   #PROMPT('Action:',DROP('Hide|Unhide|Disable|Enable')),%TrueControlAction
   #PROMPT('Take action on Prompt
?',CHECK),%TrueControlPromptToo,DEFAULT(1)
  #ENDBUTTON
 #ENDBOXED
 #BOXED,WHERE(%Condition)
  #BUTTON('False List of Controls...'),MULTI(%FalseSetting,'Window
Control:' & %FalseControl & '-' & %FalseControlAction)
   #PROMPT('Control to Hide\Unhide etc:',CONTROL),%FalseControl,Req

#PROMPT('Action:',DROP('Hide|Unhide|Disable|Enable')),%FalseControlAction
   #PROMPT('Take action on Prompt
?',CHECK),%FalseControlPromptToo,DEFAULT(1)
  #ENDBUTTON
 #ENDBOXED
#!-------------------------
 #IF(%Condition)
    IF %Condition
       #FOR(%TrueSetting)
        %TrueControlAction(%TrueControl)
        #IF(%TrueControlPromptToo)
         %TrueControlAction(%TrueControl-1)
        #ENDIF
       #ENDFOR
    ELSE
       #FOR(%FalseSetting)
        %FalseControlAction(%FalseControl)
        #IF(%FalseControlPromptToo)
         %FalseControlAction(%FalseControl-1)
        #ENDIF
       #ENDFOR
    END
 #ELSE
    #FOR(%MultiSetting)
     %MultiControlAction(%MultiControl)
     #IF(%MultiControlPromptToo)
     %MultiControlAction(%MultiControl-1)
     #ENDIF
    #ENDFOR
 #END
#!----------------------------------------------------------------



Sun, 03 Oct 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Overriding Windows greying out the foreground of a disabled entry field

2. VX-REXX Entry field: disable makes text illegible

3. Disabled entry field colors

4. Conditionally coloring an entry field

5. Browse - Field Entry Lookup

6. Disabling fields

7. Disable fields

8. Disabling fields during in-line wditing

9. Changing FontColor of Disabled Field

10. Colour of DISABLED variables or field content

11. Disabling edit fields

12. Enable & Disable Dimensioned Fields

 

 
Powered by phpBB® Forum Software