` Printed Icetips Article

Icetips Article



Par2: Template modification to pass parameters - C4
1999-03-08 -- Arnor Baldvinsson
 
The template change is easy.  Open one file in the C4/template directory, ctlbrowa.tpw. 
First locate a line starting with:

#CONTROL(BrowseUpdateButtons

In my template this is line 120.  Next locate this line:

  #PROMPT('&Update Procedure',PROCEDURE),%UpdateProcedure

this is line nr. 127 in my template.  Add the following line right
below it:

  #PROMPT('Parameters:',@s255),%UpdateProcedureParameters

Next locate this line:

%InstancePrefix:CallUpdate ROUTINE

This is nr. 500 in my template after adding the line above.  Few lines
below you will find this code:

  CLOSE(%ListView)
  LOOP
    GlobalRequest = LocalRequest
    VCRRequest = VCRNone
    %UpdateProcedure
    LocalResponse = GlobalResponse

Change it to:

  CLOSE(%ListView)
  LOOP
    GlobalRequest = LocalRequest
    VCRRequest = VCRNone
#IF(%UpdateProcedureParameters)
    %UpdateProcedure %UpdateProcedureParameters
#ELSE
    %UpdateProcedure
#END    
    LocalResponse = GlobalResponse

This does it - you now have a parameter prompt on the update buttons
properties (action tab) where you specify the parameters in the normal
format:

(Loc:MyField, Loc:MyOtherField)

ie, with the surrounding paranthesis.



Printed November 21, 2024, 1:08 pm
This article has been viewed/printed 35190 times.